A militia loyal to Iraqi Shia cleric Moqtada al-Sadr has freed a former US soldier after holding him captive in Baghdad for nine months.
The American, identified as Randy Michael Hultz, was shown on television in a US military uniform with no insignia.
He was flanked by two members of parliament from Mr Sadr's movement, including the parliament's first deputy speaker.
He was handed over to the UN mission in Baghdad, which transferred him to the US embassy. The US confirmed he was a US citizen but released no further details.
In brief remarks to Iraqi journalists hastily convened to witness his release, Mr Hultz said he had deployed to Iraq in 2003 and initially served there as a soldier for 15 months.
He remained in Iraq "in a civilian capacity from then until June of 2011, when I was taken hostage by elements of Yom al-Maoud," he said, referring to the Promised Day Brigade, an offshoot of Mr Sadr's Mehdi Army militia.
"I was taken inside Baghdad and have been kept in and around different locations within the city by al-Maoud. It was explained to me that my release has been for humanitarian purposes and there was no exchange involved."
Journalists were shown two identity cards with the name Randy Michael Hultz, one showing he had been a soldier and the other showing he had been employed as a contractor.
Sadrist politicians repeatedly described him as a US soldier and earlier identified him as Randy Michaels.
However, the Pentagon said none of its serving troops have been listed as hostages in Iraq since the remains of the last missing soldier were recovered last month.
Maha al-Douri, a lawmaker from Mr Sadr's group, said: "We declare the release of the American soldier, Randy Michaels, without any compensation, according to the instructions of Moqtada al-Sadr, as a gift from him to the soldier's family and to his people, and to correct the image of Islam."
Qusay al-Souhail, deputy parliament speaker, said the leadership of the Promised Day Brigade had made the decision to free their captive in light of the confirmation that US troops had withdrawn from Iraq.
The UN mission in Baghdad, UNAMI, confirmed that Mr Souhail and Mr Douri had handed over a US citizen and said it had passed him to the US embassy.
A US State Department official in Washington said: "We can confirm that the UNAMI has transferred a US citizen to the US embassy in Baghdad, which is providing consular assistance.
"Due to privacy considerations, we are unable to provide additional information."