Federal police members carry their weapons during a battle with ISIS militants in Mosul. Thomson Reuters MOSUL (Reuters) - Iraqi special forces and police fought Islamic State militants to edge closer to the al-Nuri mosque in western Mosul on Wednesday, tightening their control around the landmark site in the battle to recapture Iraq's second city, military commanders said.

The close-quarters fighting is focused on the Old City surrounding the mosque where Islamic State leader Abu Bakr al-Baghdadi proclaimed a caliphate nearly three years ago across territory controlled by the group in both Iraq and Syria.

Thousands of residents have fled from IS-held areas inside Mosul, the militants' biggest remaining stronghold in Iraq. But tens of thousands more are still trapped inside homes, caught in the fighting, shelling and air strikes as Iraqi forces backed by a U.S.-led coalition advance in the west.

Helicopters circling west Mosul strafed Islamic State positions beyond the city train station, the site of heavy back-and-forth fighting in recent days, and thick black smoke rose into the sky, Reuters reporters on the ground said.

Heavy sustained gunfire could be heard from the Old City area, where militants are hiding among residents and using the alleyways, traditional family homes and snaking narrow roads to their advantage, fleeing residents say.

An Iraqi air force helicopter fires missiles against ISIS militants during a battle in Mosul, March 17, 2017. REUTERS/Youssef Boudlal

"Federal police forces have imposed full control over the Qadheeb al-Ban area and the al-Malab sports stadium in the western wing of Old Mosul and are besieging militants around the al-Nuri mosque," federal police chief Lieutenant General Raed Shaker Jawdat said in a statement.

Rapid Response elite interior ministry troops were advancing on the edge of the Old City, clambering over garden walls. Islamic State responded with rocket fire, streaking the sky with white smoke plumes.

"There are teams going into the Old City since yesterday," said Rapid Response official Abd al-Amir.

Iraqi troops shot down at least one suspected Islamic State drone. The militants have been using small commercial models to spy and drop munitions on Iraqi military positions.

With the battle entering the densely populated areas of western Mosul, civilian casualties are becoming more of a risk. The United Nations says several hundred civilians have been killed in the last month, and residents say Islamic State militants are using them as human shields.

A man purported to be ISIS leader Abu Bakr al-Baghdadi at a mosque in the centre of Iraq's second city, Mosul, according to a video recording posted on the Internet on July 5, 2014. Social Media Website via Reuters TV

The senior U.S. commander in Iraq acknowledged on Tuesday that the U.S.-led coalition probably had a role in an explosion in Mosul believed to have killed scores of civilians, but said Islamic State could also be to blame.

As investigators probe the March 17 blast, Lieutenant General Stephen Townsend said increases in casualties were to be expected as the war against the insurgents entered its deadliest phase in the cramped, narrow streets of Mosul's Old City.

Local officials and eyewitnesses say as many as 240 people may have been killed in the Al-Jadida district when a huge blast caused a building to collapse, burying families inside. Rescue workers are still pulling bodies out of the site.

Huge blast

What exactly happened on March 17 is still unclear and there have been conflicting accounts of how many people died.

Iraqi military command has said one line of investigation is whether Islamic State rigged explosives that ultimately caused the blast that destroyed buildings. Iraqi military said there was no indication the building was hit directly by the strike.

Iraqi firefighters search for bodies buried under the rubble, of civilians who were killed after an airstrike against ISIS triggered a massive explosion in Mosul, March 27, 2017. Thomson Reuters

Eyewitnesses have said a strike may have hit a massive truck bomb parked by the building. Others say families were either sheltering in a basement or had been forced inside.

"My initial assessment is that we probably had a role in these casualties," Townsend, the senior coalition commander in Iraq, told a Pentagon news briefing.

"What I don't know is were they (the civilians) gathered there by the enemy? We still have some assessments to do. ... I would say this, that it sure looks like they were."

The incident has heightened fears for the safety of civilians — an important concern for Iraq's Shi'ite-led government as it tries to avoid alienating Mosul's mostly Sunni population.

The United Nations rights chief said on Tuesday at least 307 civilians had been killed and 273 wounded in western Mosul since Feb. 17, saying Islamic State was herding residents into booby-trapped buildings as human shields and firing on those who tried to flee.

(By Isabel Coles and John Davison; writing by Patrick Markey; editing by Mark Trevelyan)