The urgent need to rebuild the Iraqi army received prominent coverage when the US Secretary of Defense Ash Carter recently briefed the House Armed Services Committee on US strategy in the war against the self-styled Islamic State of Iraq and the Levant (ISIL). Carter stressed that "ISIL's lasting defeat still requires local forces to fight and prevail on the ground."

The US-led military training programme is up and running in Iraq. Already five new Iraqi army brigades and a special forces unit, the 11th Reconnaissance Battalion has recently graduated, and their training and field exercises was overseen by American, Spanish, Portuguese, Australian, New Zealander and Italian trainers.

These under-strength brigades mostly have fewer than 1,500 troops each, a third of the optimal strength of an Iraqi brigade. Nevertheless the units serve as a cadre on which to build full-strength units, with the troops trained to instruct future recruits.

Four more new Iraqi army brigades and two Peshmerga regional guard brigades are planned, and another seven Iraqi army brigades have been reconstituted from the salvaged remnants of the units destroyed in the summer of 2014.

Reforming military leadership

Forming new units and rebuilding damaged units will not be enough to bring the Iraqi army back from the dead. Iraq must also fix its senior command appointments so that Baghdad regains the ability to centrally control the planning and execution of military operations.

At present the Iraqi military is like an inverted pyramid with too many three-star generals commanding overlapping military regions and commands. Conflicting orders are often given regarding the movement of forces, creating gaps where outgoing forces have left before relieving forces arrived. This is how the collapses at Mosul and Ramadi began.

The Iraqi military needs to rotate the pyramid of command so that a proactive chief of staff sits on top of a unified command structure and issues clear orders. In this context the June 30 announcement of the retirement of Iraqi army chief of staff General Babaker Zebari is a major opportunity.

At present the Iraqi military is like an inverted pyramid with too many three-star generals commanding overlapping military regions and commands.

Maintained in the role as the Kurdish representative under an ethno-sectarian quota system, Zebari served with great dedication as the Iraqi army's senior general since 2003, but there have always been drawbacks in the arrangement.

A brave Peshmerga commander, Zebari did not rise through the ranks of the Iraqi military or attend staff college. He had no reputation with the commanders of the main combat arms of the Iraqi army, the infantry and armoured forces.

Though there are moves to replace Zebari with another Kurdish general, Iraqi air force commander General Anwar Hamad Amin, it is arguably vital that the Iraqi army is led by one of its own officers if it is to stand a chance of regaining its pride and fighting spirit.

As in the old days of the Iraqi army, the chief of staff should have a small high-powered circle of deputies: one for operations, logistics, training, administration and intelligence.

Finally, the new chief of staff needs to be empowered by Iraq's prime minister, preferably by naming the general the deputy commander of the Iraqi army.

Discipline to end corruption

Undisciplined organisation has made the Iraqi army weak and brittle.

Corrupt officers take payments from soldiers who never turn up for duty, the so-called "ghost Jundi". Units are critically undermanned and the remaining overstrained soldiers become exhausted.

The removal of a large portion of the current officer class is a difficult thing to achieve under the best of circumstances, let alone midway through a desperate war.

The US-led coalition periodically managed major leadership turnovers in Iraqi units: in 2006-2007, 35 or the top 39 commanders of battalion-level and above were removed from the two federal police divisions.

The same kind of massed rotation could be undertaken today if new units are sent to the front line, allowing degraded units with ineffective leadership to be taken out of the line for retraining and leadership reshuffles.

A final kind of indiscipline is the failure of military commanders to lead their troops during battlefield crises.

One factor in such disasters is the poor choice of command appointments. The acting commander of the Anbar Operations Centre when Ramadi fell in April 2015 was the same officer who abandoned his division in Kirkuk 10 months beforehand, creating a panic that led his division to collapse without even being attacked by ISIL.

The government has failed to punish commanders for such failures. No senior generals have yet been punished for the disasters at Mosul or Ramadi, and the Iraqi government has issued blanket amnesties for junior officers who failed their troops.

No senior generals have yet been punished for the disasters at Mosul or Ramadi...

No one is seeking a return to the draconian punishments of Saddam Hussein's days, but there needs to be some visible sanction for officers who withdraw without orders and without just cause. One of the first actions of a new empowered Iraqi army chief of staff should be to re-enact the military code of justice.

Leadership, discipline and training

Iraq's new brigades are undermanned because only 9,000 of 24,000 recruits have been mustered. The army suffers from corrupt administration and logistics, plus it is less glamorous than the al-Hashd al-Shaabi, the Popular Mobilisation Units.

If Iraqi army recruitment is to rise it will take concerted effort by Iraqi political and religious leaders. Military reforms must be supported by fatwas from the Shia religious leadership to draw recruits into the regular military and to demobilise the Hashd al-Sha'abi into the army.

Iraq has a proven track record of raising elite units by running competitive selection processes with high "wash-out" (failure) rates. This is how the revered Golden Division was formed. Tough training will again become possible if enough recruits are available.

The Iraqi military can make a comeback if Iraq empowers a well-chosen chief of staff and then focuses on leadership, discipline and training. US Secretary of Defense Ash Carter misspoke when he said that Iraqis lack "the will to fight".

A more accurate description was given by former US ambassador to Iraq Ryan Crocker who said: "Iraqis have a strong military tradition. They've got good soldiers. They need good leadership […] The Iraqi military is not rotten to the core. It was rotten at the top."

Michael Knights is the Lafer Fellow at the Washington Institute for Near East Policy. He specialises in the politics and security of Iraq. He has worked in every Iraqi province and most of the country's hundred districts, including periods embedded with Iraq's security forces.

Jabbar Jaafar is a specialist in strategic communications and analyst of Iraqi and Arab issues. He was a senior cultural adviser for the US reconstruction effort in Iraq and previously served as a company commander in the Iraqi army.

The views expressed in this article are the authors'own and do not necessarily reflect Al Jazeera's editorial policy.