BAGHDAD — When Umm Ahmed returned to her Iraqi hometown, Tikrit, in recent days she found a city devastated by fighting with militants from the Islamic State: buildings burned, shops looted, schools shuttered and hospitals inoperable.

Still, it was home, and it was good to be back.

“Today, I am in the middle of Tikrit,” Umm Ahmed, 39, said last week, preferring to be identified by her honorific. “I never believed I would go back home. I am so happy and I cannot describe my feelings, and my tears of joy haven’t stopped, because of my return home.”

More than two months ago, the Islamic State was driven from Tikrit, the hometown of Saddam Hussein and the largest city the terrorist group has lost in either Iraq or Syria. It was defeated by a combination of American airstrikes, Iraqi forces and Shiite militias, some led by Iran.

Displaced families began returning last week in a crucial test of the Shiite-dominated central government’s ability to stabilize newly liberated Sunni Arab areas without aggravating sectarian tensions that the Islamic State was able to exploit last year when it seized territories across the north and west of Iraq.