The death sentences are seen as a get-tough message from Iranian authorities alarmed about escalating street thuggery amid a sanctions-driven economic downturn.

TEHRAN — A pair of thieves caught in the act on a video posted to YouTube were executed at dawn on a residential street Sunday by a method dating back beyond medieval times: hanging.

The handcuffed men, convicted of the crime of moharebeh (waging war against God), were strung from twin cranes placed side by side in the upscale district. They were then hoisted aloft in front of a crowd of nearly 100 onlookers, with the crane operators, in effect, serving as executioners.

Their sentence was widely viewed as a get-tough message from Iranian authorities alarmed about reports of escalating street thuggery amid an economic downturn driven by escalating international sanctions. Concern about street crime has risen in the capital as the economy has plummeted.

Public executions are unusual but not unheard of in Tehran, though the practice is more common in outlying provinces. Hanging by crane is the preferred method. Iran is among the nations that impose capital punishment most frequently, along with China, Saudi Arabia, Iraq and the United States, according to human rights monitors.

The condemned men, Alireza Mafiha, 20, and Mohamad Ali Sorouri, 23, were convicted of having jumped off a pair of motorbikes in broad daylight in late November and assaulting a terrified man while brandishing a dagger.

They may have avoided arrest if not for the video.

The footage, apparently from a security camera, shows four people arriving on two motorbikes as the victim stands at a doorway. Two jump off the scooters and take the man's cash, bag and coat. Those two, authorities said, were executed Sunday.

Moharebeh — a broad category of crime that includes armed assault, rape, murder, spying and undermining the security of society — is a capital offense under Iran's interpretation of sharia, or Islamic law.

Those convicted of driving the motorbikes each received a 10-year prison term, 74 lashes and five years of police-supervised banishment from the capital, according to the semiofficial Iranian Students News Agency.

In the video, the victim appears uninjured.

The footage was posted on YouTube in early December, a week after the crime occurred, and aired on state television, prompting authorities to vow a crackdown on delinquents. One week later, authorities announced the arrests.

Iranian justice can be swift. The two suspects apparently exhausted all appeals in a little more than a month. Handcuffed and shackled at the legs, they were brought to the site of the hanging Sunday in a white police van. Neither was blindfolded. Accompanying judicial officials chanted Koranic verses.

One of the condemned men, with a shaved head and slight beard, was visibly distressed; he placed his head on the shoulder of an apparently sympathetic police officer, who, like other lawmen, wore a black ski mask.

Many in the crowd appeared to be young men from the high-unemployment, crime-ridden capital district of Shokofeh, who came to bid farewell to the condemned.

"Both of them lost their fathers when they were young," one crowd member said.

A number of female relatives, some in full black robes, were sobbing.

"Nobody was killed, so they should not be hanged," an elderly man told a television interviewer.

Others, though, were not so forgiving.

"They should be hanged," concluded a middle-aged man who, like others, did not want his name used for safety reasons. "Mugging has now become a profession for some people."

Another onlooker was less judgmental. "Hanging them is too harsh," he said. "It is better to cut off their hands."

Whether such public displays of remorseless justice will deter street crime remains an open question. A Los Angeles Times correspondent covering the event had his iPad, a $1,000 item here, stolen from his shoulder bag while speaking with distraught relatives of the condemned.

Mostaghim is a special correspondent.

Times staff writer Patrick J. McDonnell in Beirut contributed to this report.