"These two Germans came to Iran claiming to be tourists," said Malek Ajdar Sharifi, the justice department chief of East Azerbaijan province in the northwest of the country, quoted by Fars news agency.
"But the work of these two tourists in Iran and Tabriz and the way they reported in Tabriz shows that they came for espionage," he said.
"In fact these two came here for espionage and, thank God, they were identified and arrested ... The evidence for espionage was in their hands when arrested and they were planning a smear campaign against the Islamic Republic."
Sharifi said "the crime of espionage for the two Germans who came to Iran to make smear campaign and for espionage has been proved."
On Monday, Iranian state-run television showed blurred footage of the two German men "confessing" that they had been "tricked" into coming to Iran. According to the Farsi voiceover of the footage, the two detainees pointed fingers at Mina Ahadi, an Iranian human rights activist living in exile in Germany.
Ahadi, founder of the Germany-based International Committees against Execution and Stoning, has launched a global campaign to halt the impending execution of Sakineh Mohammadi-Ashtiani by stoning.
"I did not have any information about this case, but Ms Ahadi knew about it. She sent me to Iran and has gained propaganda value from my arrest. I will sue Ms Ahadi when I am back in Germany," one of the detainees was quoted as saying.
"I accept that I made a mistake. Since I had no information on the case, I was tricked by Ms Ahadi," the other German was quoted as saying.
But Ahadi on Tuesday rejected the accusations, telling news agency AFP: "I did not send them to Iran. I spoke to them about the risks and helped them make contacts."
"I do not think the journalists were mistreated physically. That's what I suspect. But they were certainly under psychological pressure," she said. "They have been in prison for a month ... no contact with their family, no phone contact, only once have German diplomats visited these journalists. They are under pressure."
The two Germans, who were arrested in Tabriz on October 10, have not been identified. It was unclear where the footage, in which the two men were shown close-up and looking healthy, had been shot.
The television report said the pair were arrested at the office of Mohammadi-Ashtiani's lawyer while trying to interview her son and after taking pictures of Tabriz prison, were the woman is held.
The Germans, who entered the country on tourist visas, reportedly work for the Axel Springer media group in Germany. Foreign reporters need special press visas to be able to work in Iran.
"We are following the news. But for the moment we have no specific information about it," the German Foreign Ministry said on Tuesday, adding the detained Germans have had "intensive consular assistance."
Mohammadi-Ashtiani's case, revealed last summer by human rights associations, has triggered an international outcry. She was initially given death sentences by two different courts in Tabriz in separate trials in 2006. A sentence to hang for her involvement in the murder of her husband was commuted to a 10-year jail term by an appeals court in 2007.
But a second sentence, to die by stoning on a charge of adultery levelled over several relationships, notably with the man convicted of her husband's murder, was upheld by a different appeals court the same year.
Iran's judiciary says a final decision is yet to be made about the case and that it is now focusing on the murder conviction of the mother of two rather than adultery charges.
"Her case is currently undergoing legal process in Tehran and if it is finalised and the order is given for the sentence to be carried out, the sentence will be carried out," Sharifi said.
"Sakineh Mohammadi Ashtiani is currently being held in Tabriz prison and is in perfect health," said the justice official.