ISTANBUL — It was a full two months after Islamic State militants stormed through Iraq, massacring captured troops and driving to within a few miles of Baghdad that the United States began taking direct military action in the country.

The Obama administration only intervened with airstrikes after the militants were threatening the Kurdish capital, Erbil, and waging atrocities against the Yazidi minority in Sinjar, near the boundaries of Iraqi Kurdistan. That fact was immediately seized on by Iraqi politicians, who accused the United States of being more concerned about protecting the Kurds than Iraq’s Arab majority.

Now, with Kurdish forces backed by American air power driving jihadist fighters out of Sinjar on Friday, the United States-led coalition appears to have a new and important victory against the Islamic State, also known as ISIS or ISIL.

But it may come with a cost: the further undermining of the Iraqi government’s authority, and intensified concern about the Kurds’ desire for independence. Political figures in Baghdad are again sounding alarmed, both about the United States’ reliability as an ally and about the unity of country.