Demonstrators chant pro-Islamic State group slogans as they carry the group's flags in front of the provincial government headquarters in Mosul, 225 miles (360 kilometers) northwest of Baghdad. (Str/AP)

Warnings from U.S. officials about the terrorist Islamic State that has established a haven in Iraq and Syria sound ominously like the intelligence alerts that preceded al-Qaeda’s attack on Sept. 11, 2001.

Richard Ledgett, the deputy director of the National Security Agency, said at the Aspen Security Forum last week that the “most worrisome” threat he’s tracking are the thousands of foreign fighters training with the Islamic State. Lisa Monaco, the White House counterterrorism adviser, said at the same gathering that the al-Qaeda spinoff poses a potential danger to the U.S. homeland.

The lights seem to be blinking red, but the United States is holding its fire for the moment, despite some calls from congressional hawks to bomb the Islamic State terrorists before they get any stronger. This delay reflects a debate within the Obama administration about how and when to fight the self­proclaimed jihadist caliphate.

The case for caution was made by Gen. Martin Dempsey, the chairman of the Joint Chiefs of Staff, at the Aspen meeting. He warned against “precipitous” military action and said that the United States “should take the longer view” on how to roll back the Islamic State fighters. Dempsey argued that the United States should channel increased military support through a new, more inclusive Iraqi government after the polarizing Prime Minister Nouri al­Maliki is replaced.

A new Iraqi government is certainly desirable, but the United States shouldn’t wait for the perfect allies in Iraq, Syria or other new battlegrounds. Imperfect though they may be, Iraqi tribal leaders and haphazard Free Syrian Army fighters need U.S. help now. And on the legal front, the Obama administration may soon need authority for direct action against the Islamic State, which as an al-Qaeda breakaway may not be covered by existing authorizations to use force.

The Islamic State is dangerous because it operates strategically, forming useful alliances and carefully planning its operations. The group withdrew from vulnerable positions in northern Syria last year and consolidated in a haven in Raqqah. From there, it expanded its operations in Iraq, sweeping across Anbar Province this spring and blitzing through Mosul and Tikrit in June.

Abu Bakr al-Baghdadi, the leader of the Islamic State, has demonstrated a mix of brutality and cunning. He sliced through Iraq by forming alliances with Sunni tribal leaders and former Baathist officers, capitalizing on their hatred of Maliki. By maintaining good operational security, he achieved tactical surprise in Mosul and elsewhere. He struck at weak points in the Iraqi military, based on what evidently was good intelligence. Though poised to attack Baghdad, he has held back, perhaps fearing a punishing U.S. reaction.

In all these ways, Baghdadi is a formidable foe. He rebuilt a network that had been reduced from its 2006 level of 10,000 fighters to perhaps 1,500 a year or so ago. What’s scary is its outreach: Roughly half of the Islamic State’s 10,000-plus fighters today are neither Syrian nor Iraqi but foreigners drawn from Saudi Arabia, Jordan, Europe and even America. The Islamic State has also begun drawing recruits from the most toxic al-Qaeda affiliates and gained their expertise in making undetectable non-metallic bombs.

How can the United States begin to combat and ultimately destroy Baghdadi and his Islamic State? A crucial ally would be a new Iraqi government, trusted by Sunnis and Kurds as well as Shiites. But the United States will also need links with Iraqi tribal leaders. An opportunity came at a conference two weeks ago in Amman, Jordan, of 200 Iraqi sheiks, Baathists and other opposition figures. But the Iraqi government denounced the meeting, saying that the attendees were “involved in the shedding of Iraqi blood.” The United States appears to have acted cautiously, despite pleas from some tribal leaders to revive the “Awakening” strategy that shattered al-Qaeda in Iraq between 2006 and 2008.

For Obama, who said last year that he hoped to move the United States away from a “perpetual wartime footing” after Iraq and Afghanistan, the Islamic State threat has been a painful reality check. Obama doesn’t want to create a new generation of enemies for the United States. But he faces a dangerous, festering menace he didn’t anticipate. The Islamic State is like an epidemic in a faraway country. For now, it may be killing mainly Syrians and Iraqis, but left untouched, it’s likely to spread until it threatens Europe and America, too.

The awful truth is that the conflict taking shape in Iraq and Syria will last for years. The challenge for Obama (and, alas, his successor) is how to fight terrorism over the next decade without making the ruinous mistakes of the previous one.

Read more from David Ignatius’s archive, follow him on Twitter or subscribe to his updates on Facebook.