FILE PHOTO - Iranian-American Baquer Namazi is shown in this undated family handout picture released February 27, 2016. Courtesy Namazi family/Handout via REUTERS

(This January 28 story corrects in paragraph six to make clear that Baquer Namazi, not Babak Namazi, sentenced in 2016.)

WASHINGTON (Reuters) - An 81-year-old Iranian-American man imprisoned in Iran, Baquer Namazi, has received a four-day leave from the Iranian government until Thursday after being discharged from a hospital, his lawyer said on Sunday.

Earlier this month, Namazi, who was detained in February 2016 and later convicted of espionage charges that he denied, was taken to the hospital for the fourth time in the past year after a severe drop in his blood pressure, an irregular heartbeat, depletion of energy and his coloring turning white, his lawyer, Jared Genser, said in a statement.

Namazi had emergency heart surgery in September to install a pacemaker, Genser said, adding that Namazi’s doctors had said prison conditions were “dangerous” for him and would worsen his health.

“I beg the Iranian authorities to show compassion and grant my father a permanent release so he can spend his remaining time with his family before we face an irreversible tragedy,” his son Babak Namazi said in a statement.

In October 2015, the Revolutionary Guards detained Namazi’s son Siamak, a businessman in his mid-40s who also has dual U.S.-Iranian citizenship, as he was visiting family in Tehran.

Both Baquer and Siamak Namazi were sentenced in the autumn of 2016 to 10 years in prison for spying and cooperating with the U.S. government. They denied the charges.

“We welcome the release of Baquer Namazi given his deteriorating health but we note that his release is only temporary,” said Heather Nauert, U.S. State Department spokeswoman. She added that the United States urged the full release of Namazi and his son “as well as other Americans unjustly held by the Iranian government.”

Iran does not recognize dual citizenship and judiciary officials have said both men would be treated as Iranian citizens in the legal process.