FALLUJA, Iraq — As Iraqi forces move through Falluja, the city is yielding the grim remnants of more than two years of Islamic State rule. Beheaded and decaying bodies. Clumps of facial hair from fighters who shaved their beards to blend in with fleeing civilians. A prison where detainees were held in cages suitable for a medium-sized dog.

The forces have found books on Wahhabism, the extreme version of Sunni Islam from which the Islamic State draws inspiration, and on Saddam Hussein, whose rule by fear and secrecy the group has replicated.

Yet even as the picture of what life was like inside Falluja under the Islamic State is becoming clearer, a visit over the weekend to areas of the city taken by pro-government forces made clear that there is still heavy fighting.

Days after Iraqi forces raised the national flag over the main government compound and declared victory, the battle has moved to western neighborhoods, where some Islamic State fighters, many of them foreigners, remain, officials said.