More than 300 prisoners held under anti-terrorism laws were released by the Iraqi government as a goodwill gesture to Sunni Muslim demonstrators staging protests against Prime Minister Nuri al-Maliki.
A committee reviewing cases freed 335 detainees whose jail terms had already finished or whose cases were dismissed because of lack of evidence.
"I, and the committee, will follow up all the cases to accelerate the release of the prisoners who are freed or completed the sentence," said Deputy Prime Minister Hussein al-Shahristani, the head of the committee.
Shahristani was speaking from the courtyard of a prison, with many of those who had been released in front of him.
He shook hands with several of the male and female prisoners, and apologised to those who had been detained incorrectly.
"I would like to apologise on behalf of Iraq's state and the ministerial committee to any of you who were arrested and jailed for a while, and then you were proven innocent. It happens everywhere not only in Iraq," he said.
Three weeks of demonstrations, mainly in Sunni-dominated Anbar province, have evolved into a tough challenge for the Shia prime minister and his government, increasing fears that Iraq risks sliding back into sectarian violence.
Sunni leaders had demanded the release of detainees held under an anti-terrorism law that many believe authorities use unfairly to target their minority sect.
Thousands of protesters were still camped out in Anbar, once the home of an insurgent campaign against US troops in Iraq, where they have blocked a major route to Jordan and Syria near the Sunni heartland city of Ramadi.
Detainee releases were just one condition from the protesters. Other demands range from the radical - calls for Maliki to step down - to the end of a campaign to track down former members of Saddam Hussein's outlawed Baath party.
Since Hussein's fall in 2003, many of Iraq's Sunnis feel they have been sidelined by the country's Shia majority. The country's government, split among Shia, Sunni and ethnic Kurds, is deadlocked over how to share power.