Iraqi forces today picked through the rubble-strewn streets of Tikrit after storming to the city centre, searching for diehard jihadist fighters and avoiding the booby traps they left behind.
Prime Minister Haider al-Abadi claimed the city was liberated but the US-led coalition that has been helping Baghdad from the air said there was "still work to be done".
Celebrations began when the black jihadist flag was replaced by Iraq's tricolour on the main provincial headquarters in central Tikrit on Tuesday following a big military push.
Yet the fate of hundreds of IS fighters thought to have been holed up in former president Saddam Hussein's hometown for a bloody last stand was unclear today.
Abadi initially said Tikrit's centre, south and west had been retaken and moments later announced the city's full liberation on social media, hailing it as a "historic milestone".
A spokesperson for the 60-nation US-led coalition that has carried out air strikes against IS in Tikrit and across Iraq suggested it was premature to claim victory in the month-old battle.
"Parts of the city remain under (IS) control and there is still work to be done," Major Kim Michelsen told AFP by email.
US President Barack Obama's deputy envoy for the coalition, Brett McGurk, said Iraqi forces had made "encouraging progress" in Tikrit.
A top leader in the Badr organisation, one of the most prominent Shiite militias in Iraq, admitted that IS had not been completely purged of jihadist fighters.
"Snipers are still there and many buildings are booby-trapped," Karim al-Nuri told AFP in the northern Tikrit neighbourhood of Qadisiya.
In scenes captured in an AFP video on Tuesday, jubilant fighters could be seen tearing up the black flag amid extensive destruction in the city.
"We are in the centre of Tikrit. The city and all administrative buildings were completely liberated," said one of them, policeman Bahaa Abdullah Nasif.
There was no immediate information on how many fighters were killed, wounded or captured in the fighting.
The government has not provided any casualty figures since the operation started on March 2.
Iraqi army and police forces, as well as volunteers and Iran-backed Shiite militias, completely surrounded Tikrit within two weeks of launching the operation.
There was a lull in fighting when government forces and their allies apparently balked at the number of snipers, booby traps, berms and trenches which IS was using to defend its city centre redoubt.
Abadi's government eventually requested strikes from the US-led coalition which has been assisting Iraqi forces elsewhere in the country since August last year.
US jets began bombing IS targets in Tikrit on March 25. France also took part in the campaign.
The move sparked a freeze in the participation of the Popular Mobilisation units, an umbrella organisation for volunteers and militias which accounted for the bulk of the forces in Tikrit.
The Pentagon had expressed unease at the role played by Iran and its proxies and said it conditioned its intervention on regular forces taking the lead.
But after giving themselves political cover by declaring they do not want to work with each other, both sides took part in the operation this week.
Tikrit, once with an estimated population of about 200,000, had been largely emptied of civilians by the time the operation was launched.
The fate of the few believed to have remained in the city was unclear, however.
Thousands of people displaced last year or more recently from Salaheddin province, of which Tikrit is the capital, have started returning to their homes in outlying liberated areas.
But the level of destruction and the threat posed by unexploded bombs mean Tikrit residents could take longer to return.
Tikrit was the hometown of executed dictator Saddam Hussein. Remnants of his Baath party collaborated with IS last summer and a victory in the Sunni Arab city carries symbolic importance for Baghdad.
Iraqi forces have been working their way north from areas south of Baghdad since last year and retaking Tikrit would mark another tactical step in the march towards Mosul, the jihadists' largest hub in Iraq.
Defence Minister Khaled al-Obeidi met all his top commanders Tuesday to discuss preparations for an operation to retake the Nineveh province, of which Mosul is the capital.
Mosul, Iraq's second city, is close to 10 times the size of Tikrit however and still holds a large civilian population.