MOSUL, Iraq -- Counterattacks by Islamic State militants on the western edge of Mosul have stalled Iraqi forces' push in the Old City, the last IS stronghold in the battle, an Iraqi officer said Tuesday.

The attacks forced Iraqi forces and the U.S.-led coalition to pull some assets away from the Old City to again clear the Yarmouk and Tanak neighbourhoods, which were declared liberated of IS in May.

The assaults underscore the Sunni extremist group's resilience in the city, Iraq's second-largest, despite months of heavy fighting with Iraqi forces backed by U.S. air power.

According to the Iraqi officer, who spoke on condition of anonymity in line with regulations, the latest counter-attacks began on Sunday by scores of IS fighters dressed as Iraqi Shiite paramilitaries. The following day, he said, a dozen coalition airstrikes on Mosul's western-most edge killed about 40 militants.

The territory that the Islamic State group still holds in Mosul has been reduced to an area that now amounts to about 2 square kilometres (0.8 square miles) in the ancient Old City district.

Front lines were quiet in the Old City on Tuesday as Iraqi special forces scouted the terrain. Troops ducked into narrow alleyways, through bright courtyards and up balconies to reach positions with a view of the now destroyed al-Nuri Mosque.

IS fighters blew up the 12th century mosque in the heart of the Old City last week, along with its landmark minaret, according to the U.S.-led coalition and the Iraqi Ministry of Defence -- an act of destruction that the authorities in Baghdad interpreted as the militants' message of defeat in the face of the relentless Iraqi offensive. IS released a statement blaming a U.S. airstrike for the destruction.

The mosque was also hugely symbolic -- it was from a pulpit there that the Islamic State group's top leader Abu Bakr al-Baghdadi in July 2014 declared a self-styled "caliphate," encompassing territories held by IS in Syria and Iraq.

Iraqi special forces Lt. Gen. Abdul-Wahab al-Saadi said IS holds "very little" territory inside Mosul at the present moment, adding that he hoped the operation would be concluded within days.

But despite staggering territorial losses, IS has managed to launch a number of counterattacks and insurgent assaults inside some Mosul neighbourhoods that were retaken from IS earlier this month.

The attacks also underscore the security threat that IS will likely pose, long after the militant group is routed from all of Mosul and other territory it holds in Iraq.

Iraqi forces launched an operation to retake Mosul's Old City just over a week ago, more than eight months after the fight to retake Iraq's second-largest city officially began.