ALAM, Iraq — The area around the Iraqi city of Tikrit is a panorama of blight, littered with the remnants of battle against the Islamic State: burned-out cars and empty mortar casings, roads made jagged from bombs. At one checkpoint, a militiaman sits with his laptop. At another, there is a pink folder on a table. Inside each are thousands of names of people suspected of being militant fighters or collaborators.

“If he is Daesh, I will arrest him,” said Hasan Jibouri, the fighter with the laptop, which he said contained 6,000 names on a no-admittance list, using an Arabic acronym for the Islamic State, also known as ISIS or ISIL. “If not, we have no problem.”

The battle for Tikrit and its surrounding villages, which pro-government forces won more than a month ago, was seen as a crucial test of the ability of the Iraqi government and its partners — including Shiite militias, Iranian military advisers and the American-led coalition — to win back territory from the Islamic State.

After the victory, an equally important challenge remains: stabilizing the Sunni-dominated area, and repopulating it, without recreating the sectarian animosities that helped the Islamic State seize the territory in the first place.