Iraq declared victory over ISIS' presence in that country on Thursday with the capture of a destroyed mosque in Mosul.

Iraqi troops have been fighting their way through Mosul for the past eight months, seizing the Grand al-Nuri Mosque on Wednesday.

Though destroyed by ISIS fighters, the capture of the 850-year-old mosque is considered a huge symbolic victory to Iraqis. It is where the Islamic State announced its caliphate almost three years ago.

“The return of Nuri mosque and minaret of Hadba today after being [destroyed] by ISIS marks the end of Daesh State falsehood,” Iraq Prime Minister Haider al-Abadi said in a statement, using the Arabic acronym for the terror group. “We will continue chasing ISIS until we kill and arrest [every] last one of them.”

A member of the Counter Terrorism Service stands at the positions of Iraqi forces at the Old City on June 29, 2017 in Mosul, Iraq. Erik De Castro / Reuters

While the Iraqi government appears assured of its victory, there is still fighting in areas of Mosul populated by civilians. Between 15,000 and 20,000 noncombatants are trapped in the Old Mosul neighborhood, which still needs to be cleared, according to Joint Operation Command spokesman Brigadier General Yahya Rasool.

“Iraqi forces have liberated the Nuri mosque and advanced in the depth of Old Mosul neighborhood,” Rasool said.

Related: ISIS Revenue Plummets as Militants Lose Ground in Iraq, Syria

ISIS now controls less than a square mile inside of Mosul, but there were indications of forward momentum inside the city.

About 300 ISIS fighter remained in the Old City, according to the Associated Press.

Members of the Iraqi Counter-Terrorism Service (CTS) advance towards the Grand Mosque of Nuri in the Old City of Mosul on June 29, 2017. Ahmad Al-Rubaye / AFP - Getty Images

“Units from Federal Police and Quick reaction Forces recaptured Al-Jumhuri hospital, and the medical complex in Al-Shifa district in the Old Mosul neighbourhood in the western side of the city of Mosul,” a spokesman for the Joint Operation Command said in a statement.

Though Iraqi authorities are calling ISIS defeated in Iraq, the terrorist organization continues to control a small amount of territory immediately west of the city that is densely populated. U.S.-led coalition officials also believe as many as 2,500 ISIS fighters still remain in the embattled Syrian city of Raqqa, according to the Associated Press.

U.S.-led coalition spokesman Col. Ryan Dillon said that victory in Mosul was “imminent” and could occur “in days rather than weeks," the AP also reported.

Nevertheless, Dillon added that “the Old City still remains a difficult, dense, suffocating fight — tight alleyways with booby traps, civilians and (ISIS) fighters around every corner.”