On November 1, 2013, Iraqi Prime Minister Nouri al-Maliki visited the White House, and made a rather stunning request. Maliki, who celebrated when the last U.S. troops left his country in 2011, asked Obama to quietly send the military back into Iraq and help his beleagured Air Force develop targets for air strikes; that’s how serious the threat from Sunni insurgents led by the extremist group ISIS had become.

Twelve days later, Brett McGurk, a deputy assistant secretary of state and the Obama administration’s senior U.S. official in Baghdad since the crisis began last month, presented to Congress a similarly dark warning. ISIS was launching upwards of 40 suicide bombers a month, he said, encouraged in part by the weakness of Maliki’s military and the aggressively anti-Sunni policies of the Shi’ite prime minister. It was the kind of ominous report that American intelligence agencies had been delivering privately for months. McGurk added that ISIS had “benefited from a permissive operating environment due to inherent weaknesses of Iraqi security forces, poor operational tactics, and popular grievances, which remain unaddressed, among the population in Anbar and Nineweh provinces.”

Maliki's requests were rebuffed; McGurk’s warnings went largely unheeded. The problem for Obama was that he had no good policy option in Iraq. On the one hand, if Obama had authorized the air strikes Maliki began requesting in January, he would strengthen the hand of an Iraqi prime minister who increasingly resembled the brutal autocrat U.S. troops helped unseat in 2003. Maliki’s heavy handed policies—such as authorizing counter-terrorism raids against Sunni political leaders with no real links to terrorism—sowed the seeds of the current insurrection in Iraq.

But while Obama committed to sell Maliki’s military nearly $11 billion worth of advanced U.S. weaponry, he was unwilling to use that leverage in a meaningful way to get him to reverse his earlier reforms where he purged some of his military’s most capable leaders and replaced them with yes men. As a result of this paradox, the Iraq policy process ground to a halt at the very moment that ISIS was on the rise.

Two months later, ISIS captured the strategically important city of Fallujah in Anbar province. Five month after that, Iraq’s second-largest city—Mosul, in Nineweh province—fell to ISIS and an army of Sunni insurgents. At the time, senior Obama administration officials went out of their way to proclaim just how impossible-to-predict the collapse of Mosul was. But interviews with a dozen U.S. and Iraqi intelligence officials, diplomats, and policy makers reveal a very different story. A catastrophe like the fall of Mosul wasn’t just predictable, these officials say. They repeatedly warned the Obama administration that something like this was going to happen. With seemingly no good choices to make in Iraq, the White House wasn’t able to listen.

“It’s simply not true that nobody saw a disaster like the fall of Mosul coming,” Ali Khedery, who served as a senior adviser at the U.S. embassy in Baghdad, told The Daily Beast. “I can’t speak for anyone else, but I literally predicted this in verbal warnings and in writing in 2010 that Iraq would fall apart.”

“I and a zillion other people said in 2014 that we needed to do more than the very slow and inadequate reaction,” added James Jeffrey, a former U.S. ambassador to Iraq. “If [ISIS] could move in and seize Fallujah and they were on the offensive, and they were active in Mosul and Nineweh [province] too, the army was lethargic and not doing very well, at that point there was a possibility for us to provide air strikes and advisers.”

Instead, the Obama policy meandered through a series of half-measures. As the Wall Street Journal reported last month, unmanned surveillance flights over Iraq that would provide crucial overhead intelligence on areas where ISIS operated were limited to about one mission per month until about mid-June. Now there are 50 such sorties over Iraq per day, U.S. officials tell The Daily Beast. The U.S. Air Force has carte blanche to fly its drones and planes over Iraq’s skies and the 300 special operators Obama sent to Iraq are now preparing target lists for these aircraft.

While the policy process in Washington was frozen, U.S. intelligence analysts still filed their warnings about major weaknesses in Iraq’s military. Both the CIA and the Defense Intelligence Agency have issued reported analysis for nearly a year warning that Iraq’s military would not be able to stand up against a sustained campaign from ISIS.

“Since last year, U.S. intelligence analysts routinely highlighted the growing problems and deficiencies within the Iraqi Security Forces,” one senior U.S. intelligence official told The Daily Beast. This official said beginning in 2013, analysts routinely warned about morale problems inside the Iraqi military, what he called “leadership shortfalls” and a “steady degradation in capabilities that was making it difficult for Iraqi Security Forces to combat ISIS.” Despite this, this official stressed it was difficult to see the historic and rapid collapse of Iraqi forces in Mosul last month nonetheless.

“It could have been a surprise for the average citizen. But I do not believe to the United States government it was a surprise,” said Tariq al-Hashimi, an Iraqi vice president currently in exile in Turkey. “Everything is monitored, you can always see where ISIS is, it’s easy to trace them. I just don’t believe they were caught by surprise.”

It was not supposed to be like this. Iraq, for all of its problems, was relatively calm until 2013. The country had already gone through its civil war in the previous decade. The Obama administration was so confident in the Iraqi military that it approved the sale of 36 F-16 fighter jets and other advanced weapons to it. When Obama announced that he was ending negotiations with Iraq over a longer stay in Iraq, his deputy national security adviser at the time, Denis McDonough said that every assessment the White House sought about Iraq’s military showed they were up to the task of defending the country on their own.

But many at the time disagreed. Stuart Bowen, who was the U.S. special inspector general for Iraq, said he had serious doubts about the fitness of Iraq’s military when the last U.S. soldiers left in 2011.

"My questions about the Iraqi military in 2011 arose from concerns expressed to me by General Lloyd Austin, who was then the commander of all U.S. forces in country,” he told The Daily Beast. “That year, he had to put out a number of fires in Iraq, the most serious of which arose in Kirkuk during the spring. That contentious engagement revealed the substantial tensions that existed between the Kurdish Peshmerga and the Iraqi Army, tensions that could have led to combat had the U.S. not intervened.” Bowen said that both Austin and Jeffrey “indicated to me that there would be—because there needed to be—a continuing U.S. military presence after 2011.”

The problem at the time was the Status of Forces Agreement (SOFA). The Obama administration and the U.S. military insisted that any extension to that agreement be approved by Iraq’s parliament. Jeffrey said public opinion polls in 2011 showed that less than 20 percent of Iraqis supported extending the stay of U.S. troops in the country. That SOFA was crucial because it provided U.S. forces with protections from local Iraqi courts that could prosecute soldiers on trumped up charges.

Maliki, according to Jeffrey, in 2011 at times floated in private the idea that the SOFA could be extended through an executive agreement. McGurk, according to U.S. officials who worked on Iraq at the time, was the one senior official who favored at the time for pursuing such an arrangement. The U.S. has similar kinds of SOFAs with other countries in the Middle East and these agreements remain secret and shielded from the public. But in the end, McGurk was overruled and the troops left. (Eventually, U.S. troops would return to Iraq under just that kind of arrangement.)

Another problem was the perception among Sunnis that the United States took a hands-off approach and allowed Maliki to consolidate power and go after Sunni political rivals. Khedery, the former adviser to the U.S. embassy in Baghdad, said he resigned in 2010 in protest because he believed that U.S. policy was enabling Maliki to emerge as a dictator.

Others who served in Iraq at the time however said this was far too simplistic. The United States actually tried in 2010 to find alternatives to Maliki, according to Jeffrey. But in the end, those efforts fell apart because the Kurds chose to form a coalition with Maliki’s political party and there were no other viable Shi’ite politicians who could take Maliki’s place. At one point, Vice President Biden himself tried to persuade the Kurdish president of Iraq, Jalal Talabani, to give up his position to Iyad Allawi, the first man the Bush administration appointed to be prime minister of Iraq’s interim government. It didn’t work.

One senior U.S. official who works closely on Iraq policy said there were no good options right now for who the United States should support. “This stuff is far more complicated than ‘white hat / black hat’ and Maliki good, that guy bad, or Maliki bad, that guy good. They’re all shades of gray, at best.” This official said that while it’s true that Maliki has alienated the Sunni minority, he also has genuine roots in Iraq’s society and real popularity. “That does not mean he is likely to form a government in the present environment, and there is growing opposition to a third term, even within his own bloc,” this official said. “But Maliki’s strength and staying power was more a function of the realities of Iraq than policies in Washington.”

Take the case of Hashimi, the Sunni vice president who Maliki’s government issued a warrant for arrest in December 2011. Jeffrey said there were always lots of questions about at least whether Hashimi’s organization maintained links to Sunni terrorists in Iraq. “I don’t know if he was personally guilty,” he said. “But the people around him clearly were a problem, that was the general thrust I was getting from people I trusted who were not in Maliki’s or Hashimi’s camp.”

Today, it’s unclear if the United States has much influence at all. One U.S. official working on Iraq told The Daily Beast that any candidate the United States publicly endorsed today in Baghdad would lose any prospect of becoming prime minister, given the current climate in Baghdad. "The other regional players have clients; we do not, and it's smart not to go down that road; guarding our role as a neutral broker and facilitator makes nobody happy but is essential for retaining a foundation for longer-term influence,” this official said.

And while the U.S. military builds up in Iraq, Obama still has not made a decision to weigh into Iraq any deeper. Speaking to the foreign press on Tuesday, Ben Rhodes, the White House Deputy National Security Adviser for strategic communication, said, “In terms of additional U.S. military action, President Obama again made clear that while he has not ordered any military action, he reserves the right to do so as necessary.”

Many of Obama’s best advisers on Iraq have been saying such military action has been necessary now for months.