Iran has released a German citizen sentenced to three years in jail, Iran's judiciary said, as part of a prisoner swap for an Iranian held in Germany on suspicion of violating US sanctions.

The announcement of his release came on Tuesday, a day after Tehran said a jailed Iranian accused of violating US sanctions had returned home from Germany.

More:

"On Monday, a German citizen returned home. He was arrested a while ago and was sentenced to three years in jail for taking pictures from sensitive places," judiciary spokesman Gholamhossein Esmaili said in a televised weekly news conference.

Iran said on Monday that Ahmad Khalili, who was arrested in Germany on a US request and subject to extradition to the United States, flew home on Sunday with Iranian Foreign Minister Mohammad Javad Zarif, who had been in Germany to attend a security conference in Munich.

"We insisted that first the Iranian citizen should return home ... then the German citizen was allowed to leave Iran on Monday," Esmaili said.

The Islamic Revolutionary Guard Corps (IRGC) has arrested dozens of dual nationals over recent years, mostly on espionage charges.

Iran said in December it was ready for more prisoner swaps with the US after it secured the return of scientist Massoud Soleimani in exchange for Xiyue Wang, a Chinese-born American held in the Islamic republic.

Decades-old tensions between Tehran and Washington have escalated steeply since 2018, when US President Donald Trump unilaterally withdrew from a landmark 2015 nuclear deal and reimposed sanctions on Iran.

Soleimani, a stem cell researcher at a Tehran university, on December 7, also flew back home from the US with Zarif.