Iraqi government forces have retaken most of the city of Fallujah from so-called Islamic State fighters who have held it since 2014, officials say.
US Defence Secretary Ash Carter said there was "still some fighting to be done" as IS still controls a significant part of the city.
But Iraq's prime minister hailed the day's events as a "liberation".
A senior army spokesperson said he expects IS to "suffer a total breakdown during the next hours".
"The enemy is collapsing. They have lost control of their fighters. They are on the run now," Lt Gen Abdul Ameer al-Shammari said.
Special forces commander Brig Haider al-Obedi told AP that his troops controlled 80 percent of the city.
Fallujah longest held city by IS
Fallujah, only 50km west of Baghdad, has been held by IS for longer than any other city in Iraq or Syria.
They captured it in January 2014.
Iraqi forces said on Friday that they had retaken Fallujah's main government compound as well as southern and eastern areas.
They were backed by air strikes from the US-led coalition.
A statement said the Iraqi flag was raised above the city council building after its capture by Counter Terrorism Force troops, police and soldiers.
Iraqi Prime Minister Haider al-Abadi said only small numbers of militants remained.
Speaking on state TV, he said: "We promised to liberate Fallujah, and we took it back. Our brave forces went into Fallujah and took control of the city centre.
"There are still some pockets that need to be cleared in the next few hours.
"I directed all the government institutions to mobilise all efforts to help civilians and provide humanitarian aid to them."
Mr al-Abadi tweeted that the city had "returned to the nation" and Daesh (another name for Islamic State) would be defeated.
He also said Mosul was "the next battle". The northern city has been under IS control since 2014 and the Iraqi army launched an operation in March aiming to retake it.
Iraq recaptured the central city of Ramadi from IS in December 2015.
IS overran Fallujah, a predominantly Sunni Arab area, in January 2014 - six months before it seized control of large parts of northern and western Iraq.
Government forces launched the offensive to take back Fallujah almost four weeks ago, after besieging the city and its suburbs for several months.
Status of civilians unknown
There was no immediate information about the thousands of civilians trapped in central Fallujah in dire conditions and with little food or fresh water.
IS militants are reported to have used residents as human shields to slow the advance of government forces and limit air strikes by a US-led coalition.
Several civilians have also been killed by militants while attempting to escape the city, including, on Monday, a two-year-old boy who was being carried by his mother.
The UN says about 68,000 people have now fled Fallujah since the government offensive began on 23 May, although Medecins Sans Frontieres and the Norwegian Refugee Council (NRC) put the figure at closer to 30,000.
The NRC has warned its supplies of emergency aid for them are running low.