The interior and defence ministries are in charge of Iraq's security
Iraq's interior minister says it has released 19 officials who were arrested amid rumours that they had been plotting a coup.
Interior Minister Jawad Bolani said they were innocent and there was no evidence that they had conspired to restore the outlawed Baath party.
The ministry had said they belonged to al-Awda, or the Return - widely seen as a front for Saddam Hussein's party.
Charges will also be dropped against four others arrested on Thursday.
The judge investigating the officials issued "an order to release all of them because they are innocent", Mr Bolani told the Associated Press news agency.
Correspondents say the arrest of the 23 officials from the interior and defence ministries came at a delicate time politically in Iraq.
Provincial elections are due to be held in January and political parties are vying for power and influence.
The interior ministry is a key part of stabilising the new Iraq and has in the past been heavily-infiltrated by Shia militias, although it has improved over the past two years.
In February, a new law allowing former low-ranking Baath party members to become civil servants again meant that some lower-level officials who had served under Saddam Hussein were allowed back to work in Baghdad's ministries.
The banned al-Awda is known as a clandestine Sunni organisation founded in 2003 to try to restore the Baath party to power, and included former members of the Baath party, Saddam's former elite Republican Guard and members of his security services.
The group has carried out assassinations and attacks over the past five years.
Critics of the government, including politicians loyal to the radical Shia cleric, Moqtada al-Sadr, have in the past accused the Iraqi Prime Minister Nouri Maliki of using detentions and arrests as a political tool.
Some MPs have asked whether these arrests might be politically-motivated.