GENEVA—The U.N. human rights office on Tuesday accused Iran of breaking international law by executing a juvenile offender.

A spokeswoman for the U.N. High Commissioner for Human Rights said the Geneva-based agency was "deeply dismayed" about the hanging of 21-year-old Ali Naderi last week. Naderi was 17 when he was allegedly involved in the murder of a woman.

"The death penalty cannot be imposed for crimes committed by persons below 18 years of age," said U.N. spokeswoman Cecile Pouilly. She noted that Iran has signed two international treaties banning juvenile executions.

The U.N. rights office was also concerned about five other men who appear to be at risk of imminent execution despite "serious concerns about the fairness of their trials and allegations that they were subjected to torture," said Pouilly.

Iran carried out at least 55 public executions in 2012, she said, adding that two men were hanged in a Tehran park Sunday. In total, 400 people were reportedly put to death in Iran last year.