A member of Iraq's elite counterterrorism service raises his national flag on Dec. 28 after Iraqi forces recaptured Ramadi, west of Baghdad, from the Islamic State. (Ahmad Al-Rubaye/Agence France-Presse via Getty Images)

THE RAISING of the Iraqi government’s flag in the center of Ramadi on Monday marked an encouraging advance in the war against the Islamic State — and not just in the territorial sense. The recapture of the Sunni city seven months after it was overrun by jihadists was accomplished by Iraqi army forces reconstituted and retrained with U.S. assistance, and backed by American and coalition air power. That the offensive succeeded without the involvement of Iraq’s Iranian-backed Shiite militias was significant, as was the participation of Sunni tribal forces that, along with local police, are eventually expected to take control of the city.

The Islamic State has now suffered three defeats at the hands of three different forces since the middle of October. Shiite militias led the recapture of the Baiji oil refinery north of Baghdad, while Kurdish fighters freed the town of Sinjar, cutting a supply line between the Islamic State capital of Raqqa, in Syria, and the Iraqi city of Mosul, which is the biggest population center it controls. The Iraqi government of Haider al-Abadi is now saying that Mosul will be the army’s next major target, while U.S.-supported Kurdish and Arab forces are inching toward Raqqa.

The flip side of this positive news is that the United States and its allies may be nearing the limit of what they can do to destroy the Islamic State without cracking the big problem at the center of the war. That is the absence of a moderate Sunni political alternative or cohesive fighting force in either Iraq or Syria. In Iraq, Mr. Abadi, under pressure from Washington, has repeatedly promised to create more political space for Sunni leaders, but has failed to do so — in large part because of countervailing pressures from Iranian-backed Shiite parties.

In Syria, the emergence of new leaders is blocked by the multi-sided civil war; secular and moderately Islamist Sunnis are the prime targets of the government of Bashar al-Assad and its Russian and Iranian allies. The opposition coalition recently established to negotiate with the Assad regime was a step forward, but it lacks the cohesion to offer a political alternative to the Islamic State — and it is in any case focused on its war with Damascus.

President Obama has slowly and belatedly approved incremental steps to strengthen the military campaign, including the dispatching of Special Operations forces to Syria and Iraq and the stepping-up of air operations. But his strategy for cracking the Sunni political problem now centers on an effort by Secretary of State John F. Kerry to enlist Russia and Iran in support of a Syrian political settlement. That long shot is unlikely to succeed without actions on the ground that Mr. Obama still resists, such as the creation of protected zones in Syria. In Iraq, the United States should give Mr. Abadi a choice between forging new compacts with Sunnis and Kurds, and watching as the United States does so without going through Baghdad.

Mr. Obama has succeeded this year in stopping the Islamic State’s expansion and beginning to roll it back. But if his last year in office is to advance the group’s destruction, he will have to find and foster the political leaders who can replace it.