SINJAR, Iraq — Kurdish and Yazidi fighters retook the northern Iraqi city of Sinjar from Islamic State fighters on Friday morning, facing only pockets of resistance as the jihadists cleared out from a town they had brutally dominated for more than 15 months.

Passing the rubble of empty houses and abandoned shops with battered metal storefronts, Kurdistan pesh merga forces coming in from different directions linked up in the center of the devastated city. They were joined there by fighters from a rival group, the Kurdistan Workers’ Party, or P.K.K., and also by fighters from the Yazidi religious minority, whose population was almost entirely rooted in the Sinjar region before fleeing enslavement and massacre at the hands of the Islamic State.

Amid deafening bursts of celebratory gunfire, a Yazidi militia fighter with a walrus mustache, Edo Qasim Shamo, proclaimed excitedly that the moment of his people’s “liberation” was finally at hand.

But even as the American-backed offensive appeared to have secured its goals after just two days, divisive political issues came to the forefront.