MOSUL, Iraq (Reuters) - Islamic State fighters launched a counter-attack against advancing U.S.-backed Iraqi forces in western Mosul during an overnight rain storm, as the battle for control of the militants’ last major urban stronghold in Iraq intensified.

Iraqi special forces soldiers run during a battle with Islamic State militants in Mosul, Iraq March 2, 2017 REUTERS/Goran Tomasevic.

Explosions and gun fire rang out across the city’s southwestern districts in the early hours of Thursday. The fighting eased in the late morning, although a Reuters correspondent saw an air strike and rebel mortar fire.

A senior Iraqi officer said Islamic State staged its attack on units from the elite Counter Terrorism Service (CTS) when the storm and strong winds hampered air surveillance and on-the-ground visibility.

He said some militant fighters hid among displaced families to get close to the U.S.-trained troops.

Iraqi forces captured the eastern side of Mosul in January after 100 days of fighting and launched their attack on the districts that lie west of the Tigris river on Feb. 19.

Defeating Islamic State in Mosul would crush the Iraqi wing of the caliphate declared by the group’s leader, Abu Bakr al-Baghdadi, in 2014, from Mosul’s grand old Nuri mosque.

Residents reported that civilians were killed in an air strike on an Islamic State-run mosque on Wednesday, highlighting the perilous situation facing hundreds of thousands of Mosul residents as the allied forces step up their campaign.

The residents said the blast collapsed or damaged a number of neighboring houses, many of which are badly made and poorly maintained. A spokesman for the U.S.-led coalition said he was not aware of an air strike on the Omar al-Aswad mosque.

The mosque was where Islamic State sent members of the Iraqi national police and armed forces to surrender their weapons and register in a militant database when the group seized control of the city in 2014. In return they received a pass to prevent their arrest and possible execution at militant check points.

QUEUES FOR FOOD

The Iraqi military believes several thousand militants, including many who traveled from Western countries, are hunkered down in Mosul among the remaining civilian population, which aid agencies estimated to number 750,000 at the start of the latest offensive.

The militants are using suicide car bombers, snipers and booby traps to counter the offensive waged by the 100,000-strong force of Iraqi troops, Kurdish peshmerga fighters and Iranian-trained Shi’ite Muslim paramilitary groups.

More than 31,000 civilians have been forced from their homes in western Mosul in the latest phase of the battle that began on Feb. 19, while the total number displaced since the offensive for Mosul started in October exceeds 191,000, according to the United Nations.

Slideshow ( 12 images )

On Thursday, more than a thousand more streamed out of southern Mosul, the majority on foot. Some said the militants fired at them as they crossed a defensive trench.

One bearded man with a rod though his broken leg was carried by six men in a rug, while an old woman was pushed in a rickety fruit cart.

Nearby, a Humvee brought a family wounded in a mortar attack to a CTS clinic. Medics cleaned their wounds and wrapped them in blankets.

Many fleeing residents complained of hunger. One boy, Ali, held his baby sister as they queued for food handouts. He said they tried to flee on Wednesday but gave up when they came under Islamic State gunfire. On Thursday they managed to get out.

The Iraqi military is taking women and children to camps and screening men to make sure they are not Islamic State fighters. Hundreds of women and children gathered in one abandoned bus station in the rain to receive food from the army and a local charity.

A counter-terrorism officer fired his pistol in the air to keep the growing crowd in line.