TEHRAN (AFP) – Iran has freed two German reporters held for interviewing the son and lawyer of a woman sentenced to death by stoning for adultery, after commuting their jail terms to 50,000-dollar fines, state media announced on Saturday.

"The two accused detained in Tabriz have been released and are departing for their home country," said Malek Ajdar Sharifi, the judiciary chief of East Azerbaijan in northern Iran, quoted by the official news agency IRNA.

The German foreign ministry said it hoped Marcus Hellwig and Jens Koch would soon be "under the protection of the embassy in Tehran."

IRNA also reported that German Foreign Minister Guido Westerwelle was due in Tehran later on Saturday, although there was no immediate confirmation from Berlin of the visit.

An Iranian court sentenced the journalists to 20 months in prison for acting against "national security" but then commuted the sentence to fines of around 50,000 dollars (36,500 euros) each, ISNA news agency said.

They work for Bild am Sonntag and were arrested on October 10 in the northwest city of Tabriz after interviewing the son and lawyer of Sakineh Mohammadi Ashtiani, whose death sentence by stoning for adultery drew widespread international condemnation.

Quoting a judiciary statement, ISNA said trial hearings were held for the two. After "examining the accusation of acting against national security, they were sentenced to a 20-month jail term," it said.

"But because of their special situation and, it is clear that they were used by one of the others accused in this case, it was felt that they deserved Islamic compassion," the statement read.

It said the verdicts were commuted to fines instead. The two Germans later on Saturday arrived in Tehran from Tabriz and refused to comment to media.

At the end of January, Iran's Mehr news agency quoted prosecutor general Gholam Hossein Mohseni Ejeie as saying the journalists had entered the Islamic republic as tourists and been arrested because they were in fact reporters.

"They have accepted that their work was illegal," he said.

Iran had accused the Germans of having links with an "anti-revolutionary group," and said they had not obtained a special government permit to work in the country, usually required of foreigners.

German Deputy Foreign Minister Wolf-Ruthart Born visited Tehran in January to discuss the case, Bild am Sonntag reported at the time.

Also in January, Iran's Foreign Minister Ali Akbar Salehi demanded "apologies" over the incident from the Axel Springer group which owns the mass-circulation newspaper.

Iranian authorities at the end of December allowed the pair to meet relatives who travelled to Tabriz after repeated requests from the German government. State television broadcast footage of the encounter.

Westerwelle later thanked his Iranian counterpart for his "support" over the detention of the journalists.

Mehr reported that Westerwelle would hold a joint news conference later on Saturday with Salehi.

Mohammadi Ashtiani has been sentenced to death by two different courts in Tabriz -- where she is also detained -- in separate trials in 2006.

Her sentence to hang for her involvement in her husband's murder was commuted to a 10-year jail term by an appeals court in 2007.

But a second sentence to death by stoning on charges of adultery levelled over several relationships, notably with the man convicted of her husband's murder, was upheld by another appeals court the same year.

She told reporters in January that she planned to sue several people -- including the German reporters -- for "disgracing" her.