Although the Saudi government waged a bitter struggle with Al Qaeda on its own soil a decade ago, the kingdom now supports Islamist rebels in Syria who often fight alongside Qaeda groups like the Nusra Front. The Saudis say they have little choice: having lobbied unsuccessfully for a decisive American intervention in Syria, they believe they must now back whoever can help them defeat Mr. Assad’s forces and his Iranian allies.

For all the attention paid to Syria over the past three years, Iraq’s slow disintegration also offers a vivid glimpse of the region’s bloody sectarian dynamic. In March 2012, Anthony Blinken, who is now President Obama’s deputy national security adviser, gave a speech echoing the White House’s rosy view of Iraq’s prospects after the withdrawal of American forces.

Iraq, Mr. Blinken said, was “less violent, more democratic and more prosperous” than “at any time in recent history.”

But the Iraqi prime minister, Nuri Kamal al-Maliki, was already pursuing an aggressive campaign against Sunni political figures that infuriated Iraq’s Sunni minority. Those sectarian policies and the absence of American ground and air forces gave Al Qaeda in Iraq, a local Sunni insurgency that had become a spent force, a golden opportunity to rebuild its reputation as a champion of the Sunnis both in Iraq and in neighboring Syria. Violence in Iraq grew steadily over the following year.

Rebranding itself as the Islamic State in Iraq and Syria, or ISIS, the group seized territory in rebel-held parts of Syria, where it now aspires to erase the border between the two countries and carve out a haven for its transnational, jihadist project. Sending 30 to 40 suicide bombers a month to Iraq from Syria, it has mounted a campaign of violence that led to the deaths of more than 8,000 Iraqis in 2013, according to the United Nations, the highest level of violence there since 2008.

In recent days, after ISIS fighters rode into the cities of Falluja and Ramadi, they fought gun battles with Sunni tribal fighters backed by the Iraqi government, illustrating that the battle lines in the Middle East are about far more than just sect. Yet the tribal fighters see the government as the lesser of two evils, and their loyalty is likely to be temporary and conditional.

As the United States rushed weapons to Mr. Maliki’s government late last year to help him fight off the jihadis, some analysts said American officials had not pushed the Iraqi prime minister hard enough to be more inclusive. “Maliki has done everything he could to deepen the sectarian divide over the past year and a half, and he still enjoys unconditional American support,” said Peter Harling, a senior analyst at the International Crisis Group. “The pretext is always the same: They don’t want to rock the boat. How is this not rocking the boat?”