Iran on Monday executed a former translator convicted of spying for the US and Israel, including helping to locate a top Iranian general killed later by the Americans, the judiciary said.
The killing of Major General Qassem Soleimani in a US drone strike near Baghdad airport in January brought decades-old arch enemies Iran and the United States to the brink of conflict.
The judiciary's Mizan Online website said Mahmoud Mousavi Majd's death "sentence was carried out on Monday morning over the charge of espionage so that the case of his betrayal to his country will be closed forever".
Its spokesman said earlier this month that Majd had been sentenced to death for spying on "various security fields, especially the armed forces and the Quds Force and the whereabouts and movements of martyr General Qassem Soleimani".
Soleimani headed the Quds Force, the foreign operations arm of Iran's Islamic Revolutionary Guard Corps.
Iran retaliated for his death by firing a volley of ballistic missiles at US troops stationed in Iraq, but US President Donald Trump opted against responding militarily.
While the attack on the western Iraqi base of Ain Al-Asad left no US soldiers dead, dozens of them suffered brain trauma.
Majd was arrested some two years ago and was not directly involved in the killing of Soleimani in Baghdad, according to a statement the judiciary issued in June.
Majd had migrated to Syria in the 1970s with his family and worked as an English and Arabic language translator at a company, Mizan said.
When war broke out, he chose to stay in the country while his family left.
"His knowledge of Arabic and familiarity with Syria's geography made him close to Iranian military advisers and he took responsibilities in groups stationed from Idlib to Latakia," the site added.
Majd was not a member of the Revolutionary Guards "but infiltrated many sensitive areas under the cover of being a translator".
He was found to have been paid "American dollars to reveal information on adviser convoys, military equipment and communication systems, commanders and their movements, important geographical areas, codes and passwords" until he came under scrutiny and his access was downgraded.
He was arrested in October 2018, Mizan said.
Iran said last week it had executed another man convicted of spying for the CIA by selling information about Iran's missile programme.
Reza Asgari had worked at the defence ministry's aerospace division for years but retired four years ago, after which he sold "information he had regarding our missiles" to the CIA in exchange for large sums of money.
Iran in February handed down a similar sentence for Amir Rahimpour, another man convicted of spying for the US and conspiring to sell information on Iran's nuclear programme.
Tehran announced in December it had arrested eight people "linked to the CIA" and involved in nationwide street protests that erupted the previous month over a surprise petrol price hike.
It also said in July 2019 that it had dismantled a CIA spy ring, arrested 17 suspects between March 2018 and March 2019 and sentenced some of them to death.
Trump at the time dismissed the claim as "totally false".