Iraq announced a major shake-up of its security services after a double suicide bombing killed more than 30 people in Baghdad on Thursday.
Yehia Rasool, spokesman for the Iraqi commander-in-chief, tweeted that a federal police chief, an intelligence chief and senior officials at the Interior Ministry are among those fired.
Mr Rasool said the deputy minister of interior for intelligence affairs, Lt Gen Amer Saddam, had been dismissed from his post, while Lt Gen Ahmed Abu Ragheef was appointed undersecretary to replace him.
Abdul Karim Abd Fadel, also known as Abu Ali Al Basri, was dismissed from his position as director general of intelligence and combating terrorism at the Ministry of Interior.
He will be replaced by Hamid Al Shatri, deputy head of the National Security Service.
Lt Gen Qais Al Muhammadawi, the head of Baghdad operations, will be transferred to the Ministry of Defence, while Maj Gen Ahmed Salim takes over his role.
Federal police commander Lt Gen Jaafar Al Battat has been replaced with Lt Gen Raed Jawdat, while the director of intelligence and security for Baghdad operations, Maj Gen Bassem Majeed, was dismissed.
The UN expressed its strong condemnation of Thursday's attack.
Two bombers detonated their explosives at a second-hand clothes market in the Bab Al Sharji area killing 32 people, Interior Ministry spokesman Brig Gen Khalid Al Muhana said.
Brig Gen Al Muhana said many poor people used the outdoor market.
He said the first bomber pretended to be ill and blew himself up when people gathered around.
The second bomber set off his explosives when people rushed to the scene of the first blast.
Security troops cordoned off the area where charred and twisted stalls were overturned.
Some of the wounded lay on the floor of the nearby Al Kindi Hospital, where medics treated their injuries.
ISIS claimed responsibility for the attack in a message posted on the Telegram channel of its Amaq news agency early on Friday.
Iraq in 2017 declared victory over ISIS after a gruelling campaign.
The weakened militant group was unable to launch attacks in the capital or other major cities where it had once terrorised the population.
But the group's remnants continue to stage hit-and-run attacks in remote areas, mainly in Iraq's north and west.