Rick Brennan remembers sitting around Baghdad back in 2011 with some fellow U.S. military planners. Talk turned to the Iraqi army of the future. In one scenario, they pictured the Iraqi army falling apart, splintering along ethnic lines.
"We painted a worst-case scenario, a nightmare scenario, that was exactly what we're seeing take place right now," Brennan says.
What's taking place right now is an Iraqi army under attack by the Islamist militants of ISIS, who are capturing cities in Iraq's north and west. At the nation's largest oil refinery, Iraqi security forces are under siege.
Two weeks ago, the army simply gave up the fight in Mosul.
Now the U.S. is sending up to 300 military personnel, including Army Green Berets, to work with the Iraqi army to help it push back against ISIS, or the Islamic State of Iraq and Syria. The first teams are beginning to arrive in Baghdad.
Brennan was on the last C-130 out of Baghdad in December 2011 and is now an analyst with the RAND Corp. He says that what those 300 military advisers will discover is hardly a secret.
"We're going to find an army that is only partially prepared to wage war on its own, and has an enormous amount of capability gaps that can't be filled in the short term," he says.
Those gaps include being able to supply an army in the field and plan operations. That's what Brennan and others noted in their final report in 2011 to Congress and the Obama administration, saying the Iraqis needed three more years of training.
That never happened. The Obama administration and the Iraqi government couldn't agree on a deal to keep U.S. troops in the country.
Now what the U.S. faces is an Iraqi army in far worse shape than the one it left in 2011.
One problem: Shiite Prime Minister Nouri al-Maliki immediately began to purge the army of the best Sunni commanders. He replaced them with Shiite officers known for their loyalty and not their competence.
"Maliki has turned back to the old Saddam tactic of putting political appointees in senior command posts," says Michael Knights of the Washington Institute for Near East Policy, referring to former Iraqi leader Saddam Hussein.
That helped erode the army: Knights estimates one-quarter of all Iraqi battalions cannot be accounted for, and all their equipment is lost.
Knights says that American military advisers can start turning things around by stiffening the spine of the Iraqi army, and by providing guidance, surveillance and operational planning.
"Putting these 300 advisers in is really more about emergency support right now, to prevent further collapses of the military," he says.
American support can begin to break the momentum of the ISIS fighters, says Jim Dubik, a retired Army general who trained Iraqi forces. They can provide not only advice, he says, but possibly U.S. bombing runs against ISIS targets.
"Airstrikes, properly coordinated, properly targeted, would provide that kind of psychological boost that would then tell the security forces, 'Look, we've got a chance to win,' " Dubik says.
Brennan says the Iraqi army shouldn't have gotten to the point where it needs a psychological boost.
It goes back again, he says, to Maliki himself. The U.S. failed to convince the Iraqi leader to repeal laws that prevented Sunnis from getting jobs, and to stop arresting and targeting Sunni leaders. Now some of those Sunnis are supporting ISIS.
"We fought the counterinsurgency fight. We did very little to work on issues of reconciliation and reintegration. We could have forced that in 2007, when we had leverage over the Iraqis," Brennan says. "But by 2010, our leverage over Maliki was waning."
Vice President Joe Biden became the Obama administration point man for Iraq. In January, Biden praised Maliki for his efforts to bring Sunni tribal leaders into the fight against ISIS.
Just two weeks later, intelligence officials told Congress that ISIS would continue to take territory in Syria and Iraq this year.