Intense battles between Iraqi security forces and ISIL fighters in Mosul are causing increasing numbers of displaced people, with 4,000 civilians fleeing the city each day, according to the United Nations.

More than 28,000 people have been forced from their homes since a coalition of US-backed Iraqi forces launched an offensive on February 19 to retake the western sector of Mosul, ISIL's last major urban stronghold in Iraq, the UN said.

The Iraqi Ministry of Migration and Displacement put the number at 31,000.

Overall, the total number displaced since the battle for Mosul started in October exceeds 176,000, according to the UN.

Al Jazeera’s Stefanie Dekker, reporting from Erbil in northern Iraq, said the latest figures meant that this was the biggest outflow of civilians since the start of the Mosul push.

"There is no secure humanitarian corridor to get out of the neighbourhoods that have been cleared, but even then there is still crossfire," she said.

"They [civilians] are having to make their way over barren land ... just southwest of Mosul. We have seen people walking across land; people in wheelchairs, women with children exhausted and terrified, also leaving relatives behind because they are not sure if the route is secure."

Some of the displaced were moving from areas already under Iraqi military control, afraid of the ongoing fighting and eager to move to safety.

Others escaped across the frontline, waiting until they saw Iraqi forces in the distance and running towards them with white flags.

Along the way, they faced horrifying scenes.

"There were bodies in the street as we walked, children, pieces of bodies," Safana, 23, told the AFP news agency, as she waited in a food distribution queue in the Hamam al-Alil camp.

She said that fighters of the Islamic State of Iraq and the Levant (ISIL) group had told people to leave her neighbourhood of Maamun in west Mosul.

"They came in the morning and said if we hadn't left by evening they would kill us."

At the Hamam al-Alil camp, 4,000 tents have been put up to receive arrivals, and more than 14,000 people have already been registered, said administrator Nader Samir.

But he said the camp, which is run by a local NGO with UN support, was struggling with several basic problems.

"Our major need is for medical treatment. We don't have any capacity and we have yet to get a response from the government on our request for help," he told AFP.

'Running out of food'

Caroline Gluck, of the UN refugee agency, told Al Jazeera that people who were unable to flee from the ISIL-controlled areas were living in appalling conditions amid increasing food shortages.

"Families told us that they are running out of food," she said from Iraq's capital, Baghdad.

IN PICTURES: Hunting down ISIL sleeper cells in Mosul

"Many are only eating bread and water or tomatoes or water, one meal a day. Not only have food prices skyrocketed, but now there is virtually no food available for sale even if you have money.

"Electricity is barely functioning and water is running out."

Fierce fighting

The push for western Mosul began after the eastern half of the city, which is separated from the ISIL-held west by the River Tigris, was declared "fully liberated" in January .

Mosul fell to ISIL in the summer of 2014, along with large expanses of northern and western Iraq.

The Iraqi military believes several thousand fighters, including many who travelled 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 fighters are using suicide car bombers, snipers and booby traps to counter the offensive waged by tens of thousands of Iraqi troops, Kurdish Peshmerga fighters and Iranian-trained Shia paramilitary groups.

READ MORE: Donald Trump vows to 'demolish and destroy' ISIL

ISIL fighters launched a counterattack against advancing US-backed Iraqi forces in western Mosul during an overnight storm.

Explosions and gunfire rang out across the city's southwestern districts in the early hours of Thursday.

The fighting eased in the late morning, although a correspondent with the Reuters news agency saw an air strike and rebel mortar fire.

A senior Iraqi officer said ISIL staged its attack on units from the elite counterterrorism forces when the storm hampered air surveillance and on-the-ground visibility.

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