So fervent was Mohammed Ali Zam, a white-turbaned cleric, in his support for Iran’s 1979 theocratic revolution that he named his son after its founder, Ruhollah Khomeini.

More than 40 years later that son, Ruhollah Zam, has been executed by hanging after being convicted behind closed doors of trying to overthrow the Islamic republic.

His death last weekend at the age of 43 has attracted international condemnation and shone a spotlight on the children of the revolutionaries who changed Iran. In a video from the 1970s circulated in Iran after his son’s execution, Mohammad Ali Zam called on demonstrators to create “the Islamic republic with the great leadership” of Khomeini.

The fact that the son of such a staunch defender of the revolution had died should prompt sober reflection, said Ali Mirfattah, a reformist journalist. His son “went as far as trying to overthrow the system”, he wrote in a post on Instagram after Zam’s death. “We have to be ashamed and regretful . . . for the years we have wasted.”

The dissident, who fuelled unrest from abroad via his Amadnews channel on the Telegram messaging app, represents “a generation which is disobedient and perhaps even rebellious because they see no positive outlook under the Islamic republic”, said Mostafa Tajzadeh, a reformist politician who spent seven years in jail following unrest in 2009 over disputed election results.

Zam also spent time in jail at that time because of his links to reformist presidential candidates. In the years since then, Zam used his social media channel to detail officials’ alleged corruption and affairs and to teach people how to make Molotov cocktails to kill security forces.

He lived in France, where he enjoyed security protection, but was lured to Iraq in October last year by intelligence agents affiliated to Iran’s elite Revolutionary Guards. He was arrested, brought to Iran and shown blindfolded on state television.

While it is not unprecedented for children of officials — the elder Mr Zam worked for a variety of state organisations — to rebel against the republic, it is extremely rare for them to be hanged. Officials’ children are more usually known for their excess and corruption.

The execution took place as the power struggle between moderate and hardline forces is intensifying after the victory of US president-elect Joe Biden.

He has promised to return to the Iran nuclear agreement after Donald Trump abandoned the deal and imposed tough sanctions. The centrist government of President Hassan Rouhani, whose signature achievement was the 2015 nuclear accord, is keen to start negotiations ahead of Iran’s presidential elections next year.

Reformists say that Zam’s execution was a tactical move by hardline forces to make it difficult for Mr Biden to enter into negotiations with Iran as hardliners fear success in these talks will benefit pro-reform forces in next year’s polls.

Hardliners, however, see it as merely a national security issue. Kayhan, a daily newspaper and mouthpiece for hardliners, said Zam’s execution marked the start of a “new era for dealing with traitors to national security” who were involved “in terrorist and criminal attacks”. It added that arresting “mercenaries of [foreign] intelligence services will no longer be limited to inside the country but will go beyond borders”.

Mr Rouhani, whose second and final term ends next year, has sought to distance himself from the execution by reiterating that the judiciary is independent.

France and the US have called the execution “barbaric” while Germany, Canada and international organisations also criticised it. The EU condemned it in the “strongest terms” and Michelle Bachelet, the UN high commissioner for human rights, said it was “emblematic of a pattern of forced confessions extracted under torture”.

Analysts in Iran question why the condemned man did not have the chance to seek clemency. Emadeddin Baghi, a human-rights activist, said Zam “surely committed a crime” but “such a heavy punishment” could not be justified even based on domestic laws.

“Hundreds of death sentences have been pending for years and are not easily implemented but Zam was executed three days after the verdict was upheld, two days of which were public holidays,” he said. “It seems a black box had to be buried quickly.”

Mr Tajzadeh said he suspected Zam’s execution was expedited to undermine the chances of a return to the nuclear deal. “They [hardliners] think a deal can weaken them in the presidential poll and strengthen pro-reform forces. Indeed, sanctions help a lack of transparency and weaken the rule of law under which suppression is easier.”

But even if that was the strategy, it does little to change the fact that many young people think like Zam — even if they do not openly dissent. “The demands of the young generation are clear. They want to have an honourable lifestyle and enjoy political and social freedom,” Mr Tajzadeh added.