Open this photo in gallery:

Revolutionary Guards commander Qassem Soleimani, centre, attends a meeting in Tehran, Iran, on Sept. 18, 2016.enei.ir/The Associated Press

An Iranian who spied for U.S. and Israeli intelligence on slain Revolutionary Guards General Qassem Soleimani has been sentenced to death, Iran said on Tuesday, adding the case was not linked to Gen. Soleimani’s killing earlier this year.

On Jan. 3, a U.S. drone strike in Iraq killed Gen. Soleimani, leader of the Revolutionary Guards’ Quds Force. Washington blamed Gen. Soleimani for masterminding attacks by Iran-aligned militias on U.S. forces in the region.

“Mahmoud Mousavi-Majd, one of the spies for the CIA and the Mossad, has been sentenced to death. ... He had shared information about the whereabouts of martyr Soleimani with our enemies,” judiciary spokesman Gholam-Hossein Esmaili said in a televised news conference.

“He passed on security information to the Israeli and American intelligence agencies about Iran’s armed forces, particularly the Guards,” Mr. Esmaili said.

Mr.Esmaili said Mr. Mousavi-Majd’s death sentence has been upheld by a supreme court and “he will be executed soon.”

Later, the judiciary said in a statement that Mr. Mousavi-Majd’s conviction was not linked to “the terrorist act of the U.S. government” in Gen. Soleimani’s killing in Iraq.

“All the legal proceedings in the case of this spy ... had been carried out long before the martyrdom of Soleimani,” the statement said, adding that Mr. Mousavi-Majd had been arrested in October, 2018.

Officials have not said whether Mr. Mousavi-Majd’s case is linked to Iran’s announcement in the summer of 2019 that it had captured 17 spies working for the CIA, some of whom it said were sentenced to death.

Nor have they said whether Mr. Mousavi-Majd’s case is linked to Iran’s announcement in February of this year that Iran had sentence to death a man for spying for the CIA and attempting to pass on information about Tehran’s nuclear program.

Gen. Soleimani’s killing led to a peak in confrontation between Iran and the United States. Iran retaliated with a rocket attack on an Iraqi air base where U.S. forces were stationed. Hours later, Iranian forces on high alert mistakenly shot down a Ukrainian passenger airliner taking off from Tehran.

Our Morning Update and Evening Update newsletters are written by Globe editors, giving you a concise summary of the day’s most important headlines. Sign up today.

Interact with The Globe