They were tried through YouTube and hanged by remote control as hundreds captured their agonising last moments on mobile phones.
But though the deaths of Alireza Mafiha and Mohammad Ali Sarvari had all the accoutrements of the 21st century, the essence of their executions was medieval.
The pair, executed for robbery, were paraded before a baying crowd of 300 in a public park at the centre of the Iranian capital, Tehran.
Amid the howls of grief and rage, a judge recounted their crime and delivered the verdict, that they would be hanged for ‘waging war against God.’
Sarvari seemed stoical. But the desperate Mafiha broke down and laid his head on the shoulder of a balaclava-clad Iranian police officer who put an arm around his back.
Moments later nooses were looped around their necks as a group of women at the front of the crowd begged their captors for forgiveness.
Their pleas fell on deaf ears. As the sun came up on Sunday morning, the executioners pressed the buttons to trigger their deaths.
Mafiha, aged 23, and Sarvari, 20, were raised up by two extending cranes to a height of around 15 feet. They were dead within seconds.
The pair had been arrested after posting a video on YouTube in December showing them attacking a man with a machete on a Tehran street.
It showed four masked men on motorbikes approaching their victim before assaulting him with a machete and taking his bag and jacket.
The 37-second clip was later shown on Iranian television and caused outrage in an urban population terrified by rising crime levels,
Mafiha and Sarvari, who are both unemployed, were arrested along with two other men.