One of the main Sunni Arab parties in Iraq has criticised the collapse of a trial of two former senior officials accused of aiding Shia death squads.
Mr Zamili was congratulated on his release by colleagues in Sadr City
The Iraqi Islamic Party said the government had failed in its duty to protect potential witnesses.
The party said witnesses had been threatened by armed groups in the days leading up to the trial.
Charges were dropped for lack of evidence. Both defendants, top health ministry officials, denied the charges.
Several prosecution witnesses failed to appear at the high-profile trial in Baghdad, after reportedly receiving death threats.
Former deputy Health Minister Hakim al-Zamili and former head of security at the ministry, Brig Gen Hamid al-Shammari, were released by the US military on Wednesday, two days after the trial collapsed.
"Following the request of the government of Iraq, the two officials have been released," said US military spokesman Maj Gen Kevin Bergner.
Mr Zamili erected a large tent outside his house in Baghdad's Sadr City area to receive crowds of guests who celebrated his release.
He is a key member of the political group led by radical Shia cleric Moqtada Sadr.
Correspondents say most of the visitors there to congratulate him were officials from Mr Sadr's political offices.
Mr Zamili said he had been kept in solitary confinement at the US military detention facility at Baghdad International Airport and had put under deliberate "psychological pressure" by his captors.
He and Gen Shammari were arrested in February 2007 at the height of sectarian fighting between the majority Shia and Sunni Muslims, in which tens of thousands of people were killed.
It was alleged that they had formed a private Shia militia that would snatch Sunni patients from hospitals and kill visiting family members.