Mohammad Heidari, accused of passing security-related information and secrets to Israeli Mossad agents in exchange for money, and Kourosh Ahmadi, accused of gathering information for the U.S. Central Intelligence Agency, were hanged at dawn, it said.
The sentence for their execution was handed down by Tehran's Revolutionary Court and confirmed by the country's Supreme Court. The report did not say when the pair were arrested nor when their trial took place.
Iran has in the past said it had successfully detected and dismantled spy networks operating inside the country. It has blamed the assassinations of scientists associated with its disputed nuclear program on Western spy agencies, especially Mossad.
The United States has denied any role in the killings. Israel has not commented.