The execution was carried out publicly "at the request of the victim's family and citizens, due to the emotional impact the case had on society", says a chief judge to the state Iranian news agency Mizan Online.
The verdict came in March and was later confirmed by the Supreme Court of the Islamic Republic.
Public executions, most often by hanging, are not uncommon in Iran and usually occur for crimes considered particularly serious.
Both murder and rape have the death penalty as a consequence in Iran. The country is, after China, one of the countries that carries out the most executions in the world, according to several human rights organizations.