After a month of battle, the sporadic rattle of gunfire heard in downtown Tikrit on Wednesday was largely celebratory, hailing the Iraqi government’s most significant victory yet over Islamic State militants.

A day after pro-government forces cleared the heart of the city, the black flags of the extremists’ self-proclaimed “caliphate” that flew over government buildings here just days ago had been replaced with those of the Iraqi state and Shiite militias. Meanwhile, a stream of Iraqi officials made their way to the city to tour the newly regained ground.

Although the government’s declaration that Tikrit was completely liberated may be somewhat premature — with Islamic State militants still holed up and fighting in neighborhoods to the north — the advances are considerable. On a two-mile journey across Tikrit, from the western side to the sprawling palace complex on the Tigris River, there were no signs of resistance in the wake of the Iraqi forces’ ground offensive.

The pro-government forces had stalled on Tikrit’s outskirts for weeks but swept into the city center with relative ease on Tuesday, their way paved by U.S.-led coalition airstrikes.

The United States had been wary of lending air support to the battle, amid sensitivities about giving cover to a ground force dominated by Iranian-backed Shiite militias. In the end, however, it did so tacitly.

There were also indications that the Iraqi pro-government forces may have had some outside help, with graffiti scrawled on city walls and the gates of the former presidential compound in Farsi, the language of neighboring Iran, implying that its forces may have played a role.

“By God, we will now liberate all of our land,” said Abu Kawther, a field commander with the Kitaeb Imam Ali militia, which fought alongside Iraqi security forces, as his men celebrated on a central Tikrit street nearby, dancing and waving their rifles.

The Sunni city of Tikrit, which was the home town of Saddam Hussein and lies 110 miles north of Baghdad, fell to the Islamic State in June, just days after the group’s capture of Mosul. The Islamic State gained a foothold here with ease, assisted by supporters of the former regime and exploiting Sunni grievances against the Shiite-led government.

On Wednesday, there were no signs of civilians in the city center. An elderly woman and her daughter found there had been “taken to somewhere secure,” one militiaman said. Houses were largely intact, indicating that the city fell with relatively little combat. Iraqi forces had outnumbered the militants by at least 10 to 1, according to estimates by Iraqi officials. In addition, the U.S.-led strikes had killed several of the Islamic State’s leaders in the city.

But the scene is likely to be different in neighborhoods to the north, where some militants have dug in. The United Nations released images in February that showed that at least 536 buildings in the city have been damaged by the fighting.

Security forces had begun the painstaking task of defusing hundreds of roadside bombs and booby traps left by the retreating militants, with explosions ringing through the streets as they went about their task.

Iraqi security forces celebrate in Tikrit on April 1, 2015, a day after the prime minister declared victory in the weeks-long battle to retake the city from the Islamic State group. (Ahmad Al-Rubaye/AFP/Getty Images)

About 185 booby-trapped houses have been identified in the city, in addition to about 900 improvised explosive devices, Interior Minister Mohammed al-Ghaban said as he visited one of Hussein’s former palaces on the banks of the Tigris.

The largest palace had suffered significant damage, seemingly from airstrikes, with an entire wing sagging. Iraqi military officials have said that the strikes helped significantly in softening the way for ground operations after the offensive stalled — although the Shiite militiamen among the pro-government forces are reluctant to acknowledge that the air raids played a role.

Ghaban spoke a few feet from the site of one of the Islamic State’s worst atrocities, the slaughter of what the government estimates to have been as many as 1,700 soldiers from Camp Speicher, a military base just outside Tikrit.

Trails of dried blood could seen on the walls along the river, where soldiers were summarily executed and thrown in the water.

“Innocent blood has been spilled here,” Ghaban said. “We don’t want revenge. We want to liberate people and the land.”

The emotionally charged nature of the Tikrit fight had raised concerns about the potential for abuses by the plethora of armed groups taking part.

In a televised speech on Tuesday, Prime Minister Haider al-Abadi insisted that only Iraqi blood was being spilled in the battle. But the Farsi graffiti scrawled next to an Islamic State flag painted on a wall outside the city’s presidential palace seemed to suggest otherwise.

“The Sepah of Khomeini defeated Daesh,” it read, referring to the late Iranian ayatollah. Sepah is a term used for the Iranian Revolutionary Guard Corps, while Daesh is a term for the Islamic State derived from its Arabic acronym.

Abadi visited Tikrit on Wednesday and pledged to continue efforts to clear the entire country of the Islamic State. He surveyed the newly secured areas with the governor of Salahuddin province, where Tikrit is located.

Local police forces began to arrive to help maintain the government’s hold on the city, though they said they would be doing so alongside the “public mobilization” units, a reference to the largely Shiite militias that are part of the operation.

The capture of Tikrit is seen as a key step before any offensive to reclaim Mosul. But parts of Tikrit are not entirely secured. The neighborhood of Qadisiya, which stretches north toward the city’s university, is not under government control.

“We are still fighting in Qadisiya,” Ghaban said. Referring to Islamic State remnants, he said, “They are trying to escape over the river.”

Some appeared to have managed it. In Alam, a town to the north cleared earlier in the offensive, residents said 23 members of Islamic State had attempted to enter after being driven out of Tikrit, resulting in a three-hour battle in while two residents were killed.

Abbas al-Zubaidi, another commander with Kitaeb Imam Ali, estimated that the number of militants left in Tikrit was about 60, based on intercepts of the group’s radio communications.

“They are hiding in holes, just like their father Saddam,” said Abu Hussein, another Kitaeb Imam Ali fighter.

Mustafa Salim contributed to this report.

Read more:

The struggle to retake Saddam Hussein’s hometown

Pro-government forces press further into Tikrit

Strains plague Iraqi, U.S. assessments of long-term fight against Islamic State

Some Iraqis return to their liberated home town