Public prosecutor Gholam Hossein Mohseni Ejeie said that the two people who had entered the Islamic republic as tourists were "now in custody" after they had asked the son of Sakineh Mohammadi-Ashtiani some questions.
"An investigation by official authorities showed these people are not journalists and they have been arrested for faking their journalistic status," Ejeie was quoted as saying by the website of Iranian state television.
The prosecutor was cited making a similar statement on ISNA news agency, in another report that failed to clearly specify the nationality of the detainees. But the UK daily Guardian reported on Monday the two detained foreigners were Germans working for Bild am Sonntag.
Ejeie linked the Germans to a Iranian human rights activist who had raised the alarm about the arrests from her base in Europe. He said the two were put into contact with Ashtiani's family by a "fugitive," alluding to the Germany-based campaigner Mina Ahadi, founder of the International Committees against Execution and Stonings.
"I learned today a fugitive in a foreign country had contacted Sakineh Mohammadi's family and said two journalists are coming to interview you on her case. Then two nationals of that country have gone and interviewed Mohammadi's son.
"In the meantime, another person got suspicious of them and informed officials," he said, without elaborating whether the son and lawyer had also been arrested.
Previously, Ahadi had said she was on a telephone hook-up Sunday with Ashtiani's son Sajjad and her lawyer Javid Houtan Kian as they were being interviewed by journalists.
"Suddenly one of the journalists shouted, 'What's happening', and then said, 'Mrs Ahadi, I must hang up,' Ahadi told AFP in Germany.
"Since then, I've had no news," Ahadi said. "Normally we talk to each other daily. I've spoken to friends of Sajjad in Tabriz, and they've had no news either. I'm 100 percent sure they've been arrested, but we don't know where they are."
Ahadi said the two journalists were working for a German newspaper, but refused to name them for "security reasons."
Ashtiani, a 43-year-old mother of two, was sentenced to death by two different courts in the northwestern city of Tabriz in separate trials in 2006.
The first death sentence, by hanging, for her involvement in the murder of her husband, was commuted to a 10-year jail term by an appeals court in 2007.
But the second, by stoning, was on a charge 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.
Since July, Iranian officials have said repeatedly that the stoning sentence has been stayed, in the face of an international outcry that has seen strong representations by the French and Italian governments as well as the Vatican.
Foreign Ministry spokesman Ramin Mehmanparast said last month that "the judicial process has not yet finished and the final judgement will be announced after the end of the process."
Prosecutor general Ejeie, who also serves as the spokesman of the judiciary, said Ashtiani's case "should not be politicised."
"The judiciary will not be influenced by the propaganda campaign launched by Western media," he said.
Ashtiani's previous lawyer, Mohammad Mostafaie, fled Iran for Norway when Tehran issued an arrest warrant against him at the end of July.