By Isabel Coles
MOSUL (Reuters) - Iraqi Prime Minister Haider al-Abadi was poised to declare victory over Islamic State in Mosul on Monday as only a few dozen militants put up resistance in the city where their leader declared a caliphate three years ago.
Gunfire and explosions could be heard as the U.S.-led coalition pounded the remaining few Islamic State positions.
"They won't declare victory until the area if fully secured," said Iraqi army officer Firas Abdel Qassim. The militants were still controlling a small patch, he said.
While defeat in Iraq's second largest city will deal a heavy blow to Islamic State, the group controls several cities and towns south and west of Mosul.
Islamic State is also under heavy pressure in its operational headquarters in the Syrian city of Raqqa and its self-proclaimed caliphate that once straddled the two countries is crumbling.
But the militants are expected to keep plotting attacks on the West and revert to the type of insurgency waged by al Qaeda that helped destabilized Iraq following the U.S.-led invasion that toppled Saddam Hussein in 2003.
The stench of corpses along Mosul's streets was a reminder of the nearly nine months of grueling urban warfare required to dislodge Islamic State, which imposed a reign of terror in the city of 1.5 million.
Seven bodies lay in an alley near a riverbank the militants reached on Sunday while attempting to escape.
Much of Mosul has been destroyed in the fighting, with rows of houses flattened by air strikes and centuries-old stone houses gutted by explosions.
Thousands of people have been killed. The United Nations says 920,000 civilians have fled their homes since the military campaign began in October. Close to 700,000 people are still displaced.
"It's a relief to know that the military campaign in Mosul is ending. The fighting may be over, but the humanitarian crisis is not," said U.N. Humanitarian Coordinator for Iraq Lise Grande."Many of the people who have fled have lost everything. They need shelter, food, health care, water, sanitation and emergency kits. The levels of trauma we are seeing are some of the highest anywhere. What people have experienced is nearly unimaginable."
Victory in Mosul will mark a vast improvement for Iraqi forces, who collapsed as Islamic State swept through northern Iraq in 2014.
Iraqi soldiers were relaxed. Some were swimming in the Tigris river. Another wiped the sweat off his face with an Islamic State flag.
Once celebrations end, Iraqi leaders will face the formidable task of managing sectarian tensions in Mosul and elsewhere that enabled Islamic State to initially win support and threaten to create new security challenges.
(Writing by Michael Georgy; Editing by Janet Lawrence)