A sniper lurks among desolated buildings of an abandoned village just over the hillside where Kurdish soldiers are dug in behind a berm, but Serbest Tivanisi, the Kurdish sector commander, doesn’t flinch as he peers over the sandbags.

Beyond the village, on the horizon roughly 15 miles to the south, is the dark smudge of Mosul and thousands more militants.

Tivanisi wouldn’t say what role his fighters would play in the campaign to retake Iraq’s second-largest city, held by militants since 2014, but they will likely be asked to occupy at least part of the territory ahead of them as the anti-Islamic State coalition closes in on the militants’ last urban stronghold in Iraq. […]