I accompanied Iraq’s elite counterterrorism force and other units from the Iraqi military and the federal police into Falluja at the end of June, during the final days of their long battle to wrest back control of the city from the Islamic State.

Falluja was the first Iraqi city to fall to the Islamic State, more than two years ago, and the militant group had all that time to learn the city, sowing traps everywhere. It was only after a long siege that the Iraqi forces moved to take the center.

In the last stages of the battle, members of the counterterrorism force, in coordination with other Iraqi units, fought their way into the neighborhood of Al Jolan in Falluja, where Islamic State fighters were making their last stand. As we moved through the bombed-out streets, gun battles raged, and the insurgents’ improvised mortars exploded among the narrow alleyways and rubble in a last-ditch effort to halt the advance of Iraq’s security forces.