Iran Human Rights explains that the state-run Iranian news agency ISNA reported that the men were put to death for acts against sharia, "based on the articles 108 and 110 of the Iranian Islamic penal code."
Articles 108 and 110 of the penal code are part of the chapter covering the punishment of sodomy, according to Iran Human Rights.
Murder, rape, armed robbery, drug trafficking and adultery are other crimes punishable by death in Iran, according to AFP.
In 2007, Iran President Mahmoud Ahmadinejad claimed there were no gay people in his country.
"In Iran, we don't have homosexuals like in your country," Ahmadinejad said according to Think Progress. "We don’t have that in our country. In Iran, we do not have this phenomenon. I don’t know who’s told you we have it.”
In 2005, Human Rights Watch reported on the executions of two men for homosexual conduct.