CAIRO - It has been a week of stunning advances by Islamic militants across a belt from Iraq to Pakistan. In Iraq, jihadi fighters rampaged through the country's second-largest city and swept farther south in their drive to establish an extremist enclave stretching into Syria. Pakistan's largest airport was paralyzed and rocked by explosions as gunmen stormed it in a dramatic show of strength.
More than a decade after the U.S. launched its "war on terrorism," Islamic militant groups are bolder than ever, exploiting the erosion or collapse of central government control in a string of nations -- Syria, Iraq and Pakistan -- that are more strategically vital than the relatively failed states where al-Qaida set up its bases in the past: Somalia, Yemen and 1990s Afghanistan.
Most galling to Washington, the crumbling state power has come in countries that the United States has spent billions of dollars to try to strengthen over the past 13 years.
Policy failings by those governments have contributed to giving militants an opening.
Iraq's prime minister, Nouri al-Maliki, has alienated the country's Sunni community, which feels sidelined by his Shiite-led government. That has pushed some Sunnis into supporting the militants and undermined the military, which includes many Sunnis.
Notably, the military and police fell apart, abandoning their posts and arsenals of weapons, when Islamic extremist gunmen overran the city of Mosul earlier this week, then swept south into other Sunni-dominated areas Wednesday.
For years, Pakistan has supported militant groups to promote its interests in Afghanistan and against its bitter rival, neighboring India. Now it faces a bloody insurgency by the Pakistani Taliban, an offshoot of the Afghan Taliban that has vowed to topple a government it accuses of being a tool of the Americans.
Islamabad's authority has always been tenuous in Pakistan's rugged, tribal-dominated and underdeveloped northwest, near the Afghan border -- and for years that was where militant groups, from al-Qaida to the Taliban, operated. Now, the Pakistani Taliban have expanded to develop a strong presence in the country's largest city, Karachi, where the airport attack took place and where police are gunned down almost daily.
The Afghan Taliban won a diplomatic victory of its own when the U.S. freed five Taliban detainees last month in a swap for the release of the only remaining U.S. prisoner of war in Afghanistan, Bowe Bergdahl.
U.S. policies have shrunk its options in all these regions. American forces left Iraq more than two years ago without winning agreement on a longer presence from Maliki's government, ending Washington's hand in security and virtually robbing it of influence over al-Maliki. Combat troops are on their way out of Afghanistan by the end of the year, which could have a similar effect as the Afghan government takes the lead in fighting the Taliban insurgency.
In Syria, the Obama administration has resisted calls to more strongly arm and finance rebels fighting against President Bashar Assad, in part due to fears of taking on the burden of another war in the Mideast and inadvertently aiding Islamic radicals rather than moderate forces. As a result, better-armed and better-funded extremists have risen to prominence anyway.
"A common theme is the inability of the international community ... to help local actors, local leadership to create more viable institutionally based societies, especially on the security side," said Salman Shaikh, director of the Brookings Doha Center in Qatar.
As a result, "weak and fragile states" have been unable to create "viable political systems of government, a political culture which is able to manage diversity and pluralism, and a security environment which is there to ... protect rather than to intimidate and impose order," he said.
Nothing illustrates the potential for Islamic militants to rearrange the region's map more than the rise of the Islamic State of Iraq and the Levant, the al-Qaida breakaway group that this week took over much of Mosul and then swept into the Iraqi city of Tikrit, farther south.
Its ambition to carve out an Islamic emirate bridging Syria and Iraq would create a source of instability in the heart of the Arab world. To celebrate the Mosul victory, the militants bulldozed a sand barrier along the long Syrian-Iraqi desert border, a symbolic gesture of erasing a line drawn nearly a century ago by Western powers.
Originally al-Qaida's branch in Iraq, the group has used Syria's civil war to vault into something more powerful. It defied orders from al-Qaida's central command to expand its operations into Syria, ostensibly to topple Assad. But it has turned mainly to conquering territory for itself, often battling other rebels who stand in the way.
Earlier this year, it captured the Syrian provincial capital of Raqqa, where it imposed strict Shariah rule, carrying out executions in public squares, smashing liquor stores and extracting "taxes" from local businesses. This month, it waged an offensive to expand its zone, making its way toward the Iraqi border.
On the Iraqi side, it captured the city of Fallujah in western Anbar province in January and parts of a second city -- and has now seized the bigger prize of Mosul. Its successes have won it rich arsenals of weapons and ammunition, as well as a reputation that has drawn veteran jihadi fighters from as far away as North Africa and Chechnya, and recruits from Europe willing to serve as suicide bombers.
The Arab Spring uprisings that began in late 2010 have also given a boost to militants, toppling autocratic regimes in Tunisia, Libya, Egypt and Yemen, that had kept a lid on extremist groups. Since then, armed jihadi factions have multiplied, particularly in Libya and Egypt. Chaos in Libya opened a flood of heavy weapons that are freely smuggled to militants in Egypt's Sinai Peninsula, Syria and elsewhere.
In a backlash, the Middle East has seen a rise of strongmen building their power on vows to crush extremism. Egypt's new president, former army chief Abdel-Fattah el-Sissi, ousted an Islamist president and has led a ferocious crackdown on his supporters. In Libya, a renegade general, Khalifa Hifter, has launched a campaign against militant groups and many of the country's politicians have rallied around him.
And Syria's Assad, trying to fend off the rebellion against his rule, has wrapped himself in the same mantle: Like el-Sissi and Hifter, he depicts himself as mired in a war against terrorists and says the world should support him to destroy jihadis who threaten everyone.
Pakistan presents a host of separate, complicated issues for the United States. A nominal ally against al-Qaida and the Afghan Taliban, its military-backed governments have bristled at U.S. pressure to fight militants in the border regions and have railed against American drone strikes on insurgent hideouts.
Successive governments have been reluctant to move against Afghan Taliban and other insurgents in its border regions, a legacy of Pakistani intelligence's close ties to the groups.
A dizzying array of militant groups operate in the country, carrying out attacks on Shiites and other minorities and, in the case of the Pakistani Taliban, outright battling the government. The military has fought them to some extent, at the price of thousands of soldiers killed. But the government has been unclear on whether its policy is to negotiate with them or try to defeat them.
Over the weekend, militant gunmen stormed Karachi's airport and while the fighters were ultimately killed, the attack -- and another in the city afterward -- illustrated the confidence of the Pakistani Taliban, which claimed responsibility, along with the Islamic Movement of Uzbekistan.
The Pakistani Taliban "has powerful friends that it can turn to," said Michael Kugelman, the Woodrow Wilson Center's senior program associate for South and Southeast Asia. He attributed its strength to operational ties with other militant groups, such as al-Qaida -- still believed to be holed up in the border region -- and the Islamic Movement of Uzbekistan.
Moreover, the Pakistani government has never formulated a strategy to deal with extremism, fluctuating between accommodation and force.
In a country that touts itself as a homeland for Muslims, authorities are reluctant to denounce an ideology championing Islam. So militants are often viewed not as enemies but as misguided Muslims, who need to be talked to, said Zahid Hussain, a Pakistani journalist whose book, "The Scorpion's Tail," tracked the rise of the country's militants.
"The narrative is basically controlled by the radicals in Pakistan, and that is their biggest victory," he said.