The Iraqi premiership on Friday announced it was decommissioning Staff Lieutenant General Abdulwahab al-Saadi, who had served as the deputy head of the elite Counter-Terrorism Service, without giving a reason.
As a top commander in the CTS, which was created and intensively trained by the US, Saadi helped recapture Mosul from the Islamic State group in 2017 and is considered by many Iraqis to be a national hero.
On Friday, Saadi said he considered the shift to a posting at the defence ministry as an "insult" and a "punishment".
The decision has sparked allegations of a purge of officials seen as unfavourable to Iraq's Hashed al-Shaabi paramilitary force, which includes factions close to Tehran.
An Iraqi government official who requested anonymity said pro-Iran factions within the Hashed had "personally" lobbied for Saadi's removal.
"These groups were operating outside the state and the only barrier was the CTS," the official told AFP.
"The idea is to sideline him to bring somebody close to Iran and no longer have the CTS as a check."
Political commentator Ghaleb al-Shabandar said the move was "the beginning of the Iraqi army's dismantling and handover to the Hashed and other armed groups".
Iraqis across the country -- including in battered Mosul, where a statue of Saadi was erected but never unveiled due to divisions in the city -- reacted with shock to the move.
The Hashtag "We are all Abdulwahab al-Saadi" began trending on Twitter, with users sharing photographs of the general aiding civilians in Mosul and cities.
"He won the people's friendship but the (politicians') hatred," one supporter wrote, while another lamented there was "no more space for patriots in this country".
Saadi led CTS troops to recapture a string of cities from IS -- Baiji and Tikrit in 2015, followed by Fallujah and Mosul.
"While the fight against IS goes on, this decision reinforces the enemy's morale and weakens Iraqis' faith in their army," said jihadist specialist Hisham al-Hashemi.
Lawmaker Khaled al-Obeidi, Iraq's former defence minister, said parliament would investigate the reasons behind the premier's decision.
Follow us on Twitter: @The_NewArab