MOSUL, Iraq — The Islamic State’s grip on Mosul has shrunk to a tighter circle of neighborhoods in the western part of the city. But many civilians are still trapped in those areas, and the militants are giving no ground easily.

As we traveled with Iraqi forces through the Rifai neighborhood last month, evidence of a brutal street fight was all around. The destruction was immense, and it seemed not a single house was free of bullet holes — or worse.

While clashes still raged in the last remaining pockets of Islamic State control in Rifai, displaced people began to trickle out at dusk. The number of people managing to flee appeared much lower than in earlier parts of the battle for the west.