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.