Haider al-Abadi Mosul 7/9/17
Iraqi PM Office
Haider al-Abadi Mosul 7/9/17
Now playing
02:01
Iraq's PM claims Mosul liberated from ISIS
Now playing
03:44
Do the 1990s hold the key to sustainable websites?
Now playing
01:10
Watch SpaceX land its Mars rocket prototype for the first time
Now playing
05:52
The climate crisis is taking these farmers' most valuable resource
U.S. President Donald Trump works on his phone during a roundtable at the State Dining Room of the White House June 18, 2020 in Washington, DC. President Trump held a roundtable discussion with Governors and small business owners on the reopening of American's small business. (Photo by Alex Wong/Getty Images)
Alex Wong/Getty Images
U.S. President Donald Trump works on his phone during a roundtable at the State Dining Room of the White House June 18, 2020 in Washington, DC. President Trump held a roundtable discussion with Governors and small business owners on the reopening of American's small business. (Photo by Alex Wong/Getty Images)
Now playing
02:37
Facebook Oversight Board: Indefinite suspension of Trump's account is 'not appropriate'
Now playing
03:41
How technology at NASA helps guide Biden on climate
Now playing
01:42
A vaccine without needles? It's on the way
SAN FRANCISCO, CA - FEBRUARY 06:  Host Conan O'Brien speaks onstage during the 5th Annual NFL Honors at Bill Graham Civic Auditorium on February 6, 2016 in San Francisco, California.  (Photo by Tim Mosenfelder/Getty Images)
Tim Mosenfelder/Getty Images
SAN FRANCISCO, CA - FEBRUARY 06: Host Conan O'Brien speaks onstage during the 5th Annual NFL Honors at Bill Graham Civic Auditorium on February 6, 2016 in San Francisco, California. (Photo by Tim Mosenfelder/Getty Images)
Now playing
01:48
Conan announces his last show after 30 years in late night
Drew Angerer/Getty Images
Now playing
03:14
Will Trump be allowed back on Facebook? This board will decide
CNN
Now playing
05:16
WTF is a SPAC?
Now playing
01:51
A shortage of tanker truck drivers could cause stations to run out of gas
CEO at Verizon Media K. Guru Gowrappan appears at the 2019 Verizon Media NewFront on April 30, 2019 in New York City.
Noam Galai/Getty Images for Verizon Media
CEO at Verizon Media K. Guru Gowrappan appears at the 2019 Verizon Media NewFront on April 30, 2019 in New York City.
Now playing
02:47
Verizon sells off Yahoo and AOL
Warren Buffett, CEO of Berkshire Hathaway, attends the 2019 annual shareholders meeting in Omaha, Nebraska, May 3, 2019. (Photo by Johannes EISELE / AFP)        (Photo credit should read JOHANNES EISELE/AFP via Getty Images)
Johannes Eisele/AFP/Getty Images
Warren Buffett, CEO of Berkshire Hathaway, attends the 2019 annual shareholders meeting in Omaha, Nebraska, May 3, 2019. (Photo by Johannes EISELE / AFP) (Photo credit should read JOHANNES EISELE/AFP via Getty Images)
Now playing
02:40
Warren Buffett warns on US inflation
Now playing
01:00
Astronauts splash down after record-setting mission
ATLANTA - APRIL 30:  A Boeing 757 with a new Delta Airlines logo sits on the tarmac following the company's emergence from bankruptcy at Hartsfield Jackson International Airport April 30,2007 in Atlanta, Georgia. The 757 sports new branding that will appear on more than 900 planes, at airports and on advertising.  (Photo by Barry Williams/Getty Images) 757
Barry Williams/Getty Images North America/Getty Images
ATLANTA - APRIL 30: A Boeing 757 with a new Delta Airlines logo sits on the tarmac following the company's emergence from bankruptcy at Hartsfield Jackson International Airport April 30,2007 in Atlanta, Georgia. The 757 sports new branding that will appear on more than 900 planes, at airports and on advertising. (Photo by Barry Williams/Getty Images) 757
Now playing
02:28
Why Delta airlines is resuming selling middle seats
Now playing
02:50
Grocery chain says 'hero pay' forcing them to close stores

Story highlights

"It is a matter of time" before victory declared, Prime Minister says

The Iraqi army is still fighting "pockets of ISIS," statement from PM says

(CNN) —  

Iraqi Prime Minister Haider al-Abadi arrived in Mosul Sunday to announce victory over ISIS forces in the city.

“Al-Abadi said the battle is settled and the remaining pockets of ISIS are encircled in the last inches of the city,” his media office said in a statement.

“It is a matter of time before we declare to our people the great victory.”

The Prime Minister said the Iraqi military is fighting to free civilians whom ISIS is “using as human shields in approximately 50 to 100 houses.”

Earlier Sunday, he tweeted that he’d arrived in the “liberated city of Mosul” and “congratulates the heroic fighters and the Iraqi people in achieving this great victory.”

Iraqi Prime Minister Haidar al-Abadi arrived in Mosul, Sunday, July 9.
Iraq PM Office/Iraq PM Office/Iraq PM Office
Iraqi Prime Minister Haidar al-Abadi arrived in Mosul, Sunday, July 9.

Video showed al-Abadi walking through streets in Mosul as crowds cheered him.

Mosul is Iraq’s biggest metropolis outside of Baghdad, and gaining control of the city was one of ISIS’ most significant strategic wins.

02:27 - Source: CNN
Drone footage shows Mosul's devastation

In 2014, Abu Bakr al-Baghdadi stood at the 12th century pulpit of the city’s al-Nuri Mosque – since destroyed by his followers – and announced the creation of the so-called Islamic caliphate. It was the first and only time the leader of the terrorist group spoke publicly to his followers.

When the terror group seized Mosul in June of that year, it also took control of more than 2.5 million people and subjected some to horrors.

02:22 - Source: CNN
Mosul's Great Mosque of al-Nuri blown up

It beheaded people in public, threw gay men to their deaths from the top of buildings and made prisoners out of men who did not grow beards and women who did not wear Islamic clothing such as burqas.

In October last year, al-Abadi announced the start of the mission to retake Mosul, using a diverse coalition of about 100,000 troops.

Mosul has been considered one of the main entry points for foreign fighters coming into the country.

As fighters flocked to Mosul, hundreds of thousands of residents fled, prompting a refugee crisis.

The city is also near some of Iraq’s most vital oil fields, as well an oil pipeline that services Turkey. Securing these fields could bolster Iraq’s economy and hit ISIS’ finances hard, as the militant group sells oil illegally to fund its operations.

02:24 - Source: CNN
Mosul: The last ISIS stronghold in Iraq

Long operation

The Iraqi security forces’ operation to retake the city began last October, and while no one was expecting the street-to-street battles to be easy, the fighting has dragged on for months.

First to fall was east Mosul, which was retaken in January. A second push, initiated in February, has focused on pushing remaining militants out of the west of the city.

Before ISIS seized control, Mosul was home to 2.5 million people. But hundreds of thousands fled as ISIS asserted their violent, extremist policies.

Since the start of the offensive to take it back, almost three-quarters of a million residents have fled. Many now languish in camps for Internally Displaced People (IDPs) or have fled the country entirely.

CNN’s Ali Younes and Faith Karimi contributed to this report.