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 judiciary had last month said Mahmoud Mousavi Majd had spied on former Revolutionary Guards commander, Qasem Soleimani, adding that the case was not connected to Soleimani’s killing in a U.S. drone strike near Baghdad airport in January.

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.”

Majd had been found guilty of receiving large sums of money from both the U.S. Central Intelligence Agency and Israel’s Mossad, said the judiciary’s spokesman, Gholamhossein Esmaili.

Majd had migrated from Iran to Syria in the 1970s with his family and worked as an English and Arabic language translator at a company. 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.”

According to the court, 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.