ERBIL, Iraq — For months before the fall of Mosul, Iraq’s second-largest city, Washington and London were getting detailed warnings about jihadist plans to exploit Sunni resentment toward Iraqi Prime Minister Nouri al-Maliki and launch an ambitious takeover of northern and western Iraq.

Kurdish military sources say the strategy of the ultra-radical Islamic State of Iraq and al-Sham (ISIS) was telegraphed long in advance. The Kurds, who have their own autonomous region in northern Iraq and their own armed forces, monitored developing ties between the jihadists and tribal leaders as well as growing contacts with former Iraqi military officers.

The Kurds became especially alarmed at signs that ISIS had already formed a shadow government in Mosul, weeks before initiating the carefully planned takeover of the city 10 days ago. According to the same Kurdish military sources it was accomplished with ease and without serious fighting after local Iraqi commanders agreed to withdraw.

The prime minister of the semi-autonomous Kurdistan region, Nechirvan Barzani, says he warned Baghdad and the United States months ago about the threat ISIS posed to Iraq and the group’s plan to launch an insurgency across Iraq. The Kurds even offered to participate in a joint military operation with Baghdad against the jihadists.

Washington didn’t respond—a claim that will fuel Republican charges that the Obama administration has been dangerously disengaged from the Middle East. Iraqi Prime Minister al-Maliki dismissed the warnings, saying everything was under control.

The Kurds’ intelligence head, Lahur Talabani, says he handed Washington and London detailed reports about the unfolding threat. The warnings “fell on deaf ears,” he says.

Several British parliamentary delegations to Kurdistan in recent months also were warned by Kurdish politicians that Sunni resentment was boiling over and that ISIS was forming alliances apace with Sunni tribal leaders and members of the late dictator Saddam Hussein’s Baath Party.

ISIS operates in both Iraq and Syria, and has ambitions to take ever more territory, regardless of borders, in the region it calls al-Sham. The group grew out of the savage jihadist movement created by Jordanian Abu Musab al-Zarqawi in Iraq after the American invasion in 2003. After 2006, when Zarqawi was tracked down and killed by U.S. forces, and “the surge,” in which the Americans enlisted the aid of Sunni tribal leaders, the group was badly weakened in Iraq. But during the insurgency against the regime of Bashar Assad in neighboring Syria, which began in 2011, the organization began to gain strength at the expense of more moderate rebel groups that hoped for support form the West, which never materialized.

As the Syrian civil war intensified, the Assad regime that ISIS was supposed to be fighting adopted a strategy that actually helped spur the group’s extraordinary rise. When ISIS started gaining strength—along with a reputation for beheadings, crucifixion and other barbarities—the manipulative Assad was careful not to target it. ISIS also turned its guns on other less radical rebel groups.

Meanwhile, indirect assistance from the Assad regime came in many forms—from buying oil from ISIS-controlled wells in eastern Syria to relatively mild air strikes against ISIS compounds in contrast to the pounding other rebels suffered.

At the start of the uprising against his regime, Assad released hundreds of jihadist detainees from Syrian jails, a move that has prompted moderate Syrian insurgents to charge that ISIS is in league with Damascus and that the terrorist organization was “regime-made” and “inserted into the body of the revolution,” all part of an effort to poison the insurgency and allow Assad to argue he was fighting extremists.

The moderate Syrian Coalition has argued that the dark alliance between ISIS and Assad has included operational coordination, although no evidence of that has been provided.

Brian Fishman, a fellow with the Combating Terrorism Center at West Point, sees the tie-up as being more indirect and byzantine, noting there is a difference between “an explicit partnership or an implicit alignment of interests.” And he maintains that the moderates have themselves to blame, too, when they made the “strategic blunder” of embracing jihadists at first—a move that handed Assad the opportunity to paint the whole uprising against his regime as an extremist revolt as opposed to a popular broad-based revolution.

The West fell deeper into the trap benefiting both ISIS and Assad by refraining from assisting the moderates “even when the latter confronted the increasingly powerful ISIS on the battlefield,” argues Murhaf Jouejati, a Mideast expert at the National Defense University.

On Monday, President Obama told CBS there is no link between withholding arms from moderate rebel forces in Syria and the meteoric rise of ISIS.

“When you get farmers, dentists and folks who have never fought before going up against a ruthless opposition in Assad,” he said, “the notion that they were in a position to suddenly overturn not only Assad but also ruthless, highly trained jihadists if we just sent a few arms is a fantasy.”

His comments sparked a sharp retort from Louay Safi, spokesman for the Syrian Coalition, who said the U.S. president is seeking “to cover up the inability of his administration to prevent the deterioration of the political and humanitarian situation in the Levant.” He added: “Had the Obama administration heeded the advice of the former Secretary of State Hillary Clinton we would not have had the current situation in Syria or in the region as a whole.”

In her book Hard Choices, published this month, the former secretary of state says she was convinced that arming and training moderate rebel groups early in the civil war in Syria was the best way to turn the tide against Syria’s Assad but she was overruled by Obama. “The risks of both action and inaction were high, [but] the president’s inclination was to stay the present course and not take the significant further step of arming rebels,” she wrote.

Obama administration officials say at the root of that decision was a fear that advanced weaponry would leak to jihadists and be turned against the West.

When Mosul fell, ISIS took over an arsenal’s worth of weapons from the evanescing Iraqi army.

But there’s one more twist in this convoluted tale of cynical plots. Now the increasingly confident ISIS forces are saying they will move on the holy cities of Najaf and Karbala, which are sacred not only to Iraqi Shiites, but to the Iranians who have been vital supporters of Assad in Syria, so his game of cultivating the most extreme of his enemies may be drawing to a close. Recently, Assad’s air force has started targeting ISIS with a vengeance.