The pair were handed to Japanese diplomats at Baghdad’s Um al-Qura mosque on Saturday.
Looking tired, but in good health, Jumpei Yasuda and Nobutaka Watanabe told a Reuters cameraman they had been treated well.
Yasuda, 30, a freelance journalist, and Watanabe, 36, a former member of the Japanese military with ties to a civic group, said they had been treated with respect after being taken hostage on Wednesday west of Baghdad.
"We were treated kindly," Yasuda said. "We had a good meal every day. I don't know the place where we were. We were caught around Abu Ghraib and after that we were blindfolded and changed house every day.
"We were released this morning. We are very glad and want to say thank you to everyone."
The men were handed to the Association of Muslim Scholars, a group which has facilitated the release of several groups of foreign hostages in Iraq, including three other
Japanese released on Thursday.
"Now many people in Falluja are dying because the Americans attacked Falluja. Many Iraqi people are dying in this country. It's a problem."
Nobutaka Watanabe, freed hostage
A Japanese Foreign Ministry official in Tokyo confirmed the two were in the custody of Japanese diplomats in Baghdad.
The area west of Baghdad, stretching from Abu Ghraib to Falluja and beyond, is notorious for attacks on US convoys and foreigners by resistance fighters fighting the occupation.
Watanabe said he wanted to tell people about conditions in Falluja, where US forces have launched an operation to root out insurgents. Hospitals say hundreds of civilians have been killed in the fighting.
"Now many people in Falluja are dying because the Americans attacked Falluja," he said in broken English. "Many Iraqi people are dying in this country. It's a problem."
More than 40 foreigners have been taken hostage in Iraq. Most have been released. Both Sunni and Shia leaders have appealed for kidnappers not to harm foreign civilians.
More hostages released
On Friday, a Canadian was delivered to a Shia religious office in Najaf, and three Czechs were freed in Baghdad.
But several foreigners are still missing, including two US soldiers, a US contractor, a Palestinian, a Dane, a Jordanian-born businessman and three Italians.
A fourth Italian was killed by his captors who threatened to kill the other three if Italy did not withdraw from Iraq.
Late on Friday, a videotape of a man dressed in a US camouflage uniform who identified himself as Private Keith Matthew Maupin was shown on Aljazeera television.
His captors said on the tape they were willing to swap him for Iraqis held by US forces.