TEHRAN -- An eerie silence filled the air as a crowd of around 300 gathered Sunday just before sunrise in a Tehran park. They awaited the arrival of two young men who were about to die.
The condemned stood shoulder to shoulder, motionless, in front of two police trucks with two nooses hanging from extendable cranes, about 15 feet high. Black-clad executioners were inspecting the remote controls they would use to hang the men, both in their early 20s, who were convicted of stabbing a man in November and stealing his bag and the equivalent of $20.
From behind a makeshift barrier of scaffolding, the crowd jostled for position. "Let's move to the other side," one spectator whispered to his wife, pointing to the spot where Iranian state television cameras had been set up. "I think we will have a better view from there."
Although every year hundreds of convicts are hanged in Iran, a public hanging in a central park in Tehran is a rare event. Most hangings take place inside prisons, according to Iranian judicial officials and international human rights organizations.
Sunday's execution in Park-e Honarmandan (Artists Park), near the crime scene, was part of a heavy-handed offensive by Iranian authorities, who say they are trying to prevent rising crime rates from getting out of hand by setting harsh examples. In recent weeks, public executions have been stepped up, and in several large cities the police have been rounding up what they call thugs and hooligans.
Police commanders and other officials blame government mismanagement of the economy -- which they say has caused a rise in unemployment and inflation -- for the increase in crime. International economic sanctions have aggravated problems, many here say, leading to a record gap between rich and poor in Iran.
While no official statistics are publicly available, officials report a rise in violent crimes, mostly perpetrated by young men attacking their victims with knives to get money and other valuables. Local news media report only a fraction of the episodes, but at social gatherings of middle-class Iranians -- the usual targets -- horrific stories of theft, kidnapping, rape and home burglaries abound.
"Two young men entered my house two weeks ago and beat me senseless," said Manijeh, 54, a homemaker from north Tehran, a more affluent section of the city. The intruders bound her arms and legs and beat her, asking for the location of the safe, she said. "But we don't have a safe," said Manijeh, who declined to reveal her surname out of fear that the burglars would return. They stole her car, ransacked her home and took nearly everything inside, she said.
"Our city has become completely unsafe," said Manijeh, speaking after her recent release from a hospital. "These things would never happen until some years ago. We need the harshest measures to stop these criminals."
Armin, 30, an engineer, said his father was recently robbed and beaten by a gang of thieves on motorcycles. "They hit him hard, but afterwards he received an anonymous call telling him where to find his bag," he said. "They took all his money but returned his documents."
On Sunday, the two condemned men, Alireza Mafiha, 23, and Mohammad Ali Sarvari, 20, stood before the onlookers, many of whom said they were family members and friends.
"They have shaved his hair," said one young man pointing at Mr. Mafiha who said he knew both men. Mr. Sarvari, baby-faced, stared wide-eyed into the crowd.
The two men, both unemployed and from poor families, had been caught two months ago on a security camera robbing a man and stabbing him, helped by two accomplices. Video from the crime spread on the Internet and caused a widespread uproar, prompting politicians and clerics to call for harsh measures.
Two weeks later, all four men were arrested. The head of Iran's judiciary, Ayatollah Sadegh Larijani, made it clear in comments on the crime that even though their victim had not died, a death sentence for the two main defendants, Mr. Mafiha and Mr. Sarvari, was likely. "We need to act assertively and increase the costs for those committing street crimes," he said, according to the semiofficial Fars news agency.
During their trial, Mr. Mafiha said he needed money to pay for an operation for his mother. He and Mr. Sarvari had both lost their fathers at an early age, their lawyer explained. "We needed the money because of poverty; I am sorry," said Mr. Mafiha, the semiofficial Iranian Students' News Agency reported in December.
Judge Abdolghassem Salavati, notorious for his harsh treatment of those arrested during intense street protests in 2009, convicted both men of being "mohareb," a Shiite legal term that translates as "waging war against God"; the crime carries the death sentence in Iran. Judge Salavati said the two men had threatened public security and caused fear and intimidation. He sentenced each of their two accomplices to 10 years in prison, followed by five years in exile in a provincial town, and also to 74 lashes.
Many in Tehran applauded the harsh sentence for Mr. Mafiha and Mr. Sarvari, saying they hoped that it would make criminals think twice about attacking people. But others doubted that would happen.
"The number of quarrels, suicide, murder and crime are all up," Amanollah Qaraei Moghadam, a sociologist, recently wrote on Mellat Online, an Internet news site. "It is 100 percent clear the situation will not change unless the economy improves."
Other critics said the punishment was far too severe. "Why were these men executed? They didn't kill anybody," said Saleh Nikbakht, a lawyer who regularly defends dissidents and political activists. "More severe punishments will not mean there will be less crimes. We have deeper problems."
On Sunday, as the sun slowly started rising in the east of Tehran, the executioners led Mr. Mafiha and Mr. Sarvari to the cranes. Three young women in the crowd begged for forgiveness, but a representative of Iran's judiciary described the crime and read out the verdict.
Mr. Mafiha, in tears, laid his head on the shoulder of one of the executioners, who placed his arm around him. After the nooses were placed around their necks, both men were pulled up by the two cranes. They died silently as many in the crowd shouted in protest, while others used smartphone cameras to record the scene.
"This is not fair," said one young man, crying loudly while being dragged away by another friend. "If they hadn't been caught on camera this would have never happened to them."
Ramtin Rastin contributed reporting.
Correction: January 20, 2013, Sunday
This article has been revised to reflect the following correction: An earlier version of this story and a picture caption misstated the ages of the two men who were executed. Alireza Mafiha was 23 and Mohammad Ali Savari was 20.
This article originally appeared in The New York Times.