Iran has released two German journalists who were arrested in October for interviewing the son of a woman sentenced to death by stoning.

Marcus Hellwig and Jens Koch were originally sentenced to 20 months in prison for committing acts against national security, but their penalties were commuted to cash fines of $50,000 US each. On Saturday, they were freed.

The two Germans, a reporter and a photographer for the Bild am Sonntag newspaper, had entered the country on tourist visas that did not permit them to do any reporting.

They were detained while interviewing the son of Sakineh Mohammadi Ashtiani, a woman condemned to death by stoning after being convicted of adultery.

The case of the mother of two and her brutal sentencing sparked an international outcry against Iran.

A court in the northwestern city of Tabriz ruled that the journalists deserved to "enjoy Islamic mercy."

Bild am Sonntage confirmed the release of the tabloid's two employees to The Associated Press.

Germany's Foreign Ministry said Saturday that the two had been released and were in the care of German consular officials.

"We hope to get them to the embassy in Tehran today," said a ministry spokesman, who declined to give a name because of government policy.

Iran has previously said the two Germans confessed to breaking the law.

With files from The Associated Press