The United States on Monday denounced Iran's second execution over ongoing protests, saying the latest killing, carried out in public, showed the clerical leadership feared its own people.

"We denounce this draconian treatment in the strongest terms," State Department spokesman Ned Price told reporters.

"These harsh sentences, and now the first public execution at least, are meant to intimidate Iran's people, they're meant to suppress dissent and they simply just underscore how much the Iranian leadership actually fears its own people," he said.

At the United Nations, spokesman Stephane Dujarric called for a halt to executions, saying "there's no place for capital punishment."

Secretary-General Antonio Guterres "believed that the circumstances of this were particularly cruel," Dujarric said.

Majidreza Rahnavard, 23, had been sentenced to death by a court in the city of Mashhad for killing two members of the security forces with a knife, and wounding four other people, the judiciary's Mizan Online news agency reported.

It said he was hanged in public in the city, rather than inside prison.