A woman standing outside her home watches Iraqi special forces in Mosul’s Mishraq neighborhood. The area was recently retaken from Islamic State militants. (Hadi Mizban/AP)

Hundreds of thousands of people who remain in this northern Iraqi city are struggling to find food and safe drinking water as the protracted offensive against Islamic State militants batters their neighborhoods.

When the battle began seven weeks ago, aid agencies feared that an exodus from the city would overwhelm already crowded camps. Instead, most people heeded government advice to stay in their homes as security forces advanced.

Now many of those residents lack even basic services, with water supplies cut by the fighting, and U.N. and government aid distributions unable to reach all of those in need. Some residents are moving from neighborhood to neighborhood in search of food or to escape the bombardment.

Meanwhile, in areas still controlled by the Islamic State, a siege by security forces is slowly tightening, pushing up food prices and causing shortages while the militants prevent people from leaving.

Iraq is struggling to meet the needs of 3.2 million people displaced over the past three years during fighting against the Islamic State. To limit the displacement from Mosul, the government airdropped leaflets over the city telling civilians to stay put.

(Video: Reuters / Photo: AP)

But few commanders expect the battle to finish anytime soon, and the misery unfolding in Mosul is expected to worsen as winter sets in.

Reaching people inside the city is risky for humanitarian agencies, which also say they do not have enough aid to meet the need.

This month, Iraqi counterterrorism forces escorted a truck carrying bottled water into the neighborhood of Zuhoor, which had been retaken two days earlier. People quickly crowded around to grab whatever they could.

“Is there any food?” they clamored. “We don’t have any food.”

[The mounting death toll in Mosul forces questions about the battle plan]

Because of the shortages, some residents have decided to leave the recently reclaimed neighborhoods and move to others on the city’s edge that are better supplied.

Only people who end up in the camps are included among the official number of displaced — 100,000 people — and the United Nations says it has no way to gauge how many internally displaced are in the city.

Jassim al-Attiyah, Iraq’s deputy minister for migration and displacement, estimated that more than 150,000 are displaced within the city and that hundreds of thousands of others remain in their homes but still need aid.

“There is some aid, but it’s a big battle,” he said.

On the far eastern outskirts of the city, Haitham Mazin, 40, his wife and three children are living with a relative in Gogjali, where water and food are distributed more frequently, and some medical assistance is available.

Mazin had wanted his family to stay in their home in the Zahra neighborhood after the area was retaken by Iraqi security forces, but the food and fuel he had stockpiled ran out. He said that aid distributions were haphazard and that while some people with connections to security forces had received enough assistance to even sell some, other families, including his, had gone without.

Dependent on well water, which is not safe to drink, residents had fought when water supplies arrived, he said.

“We became like beggars,” he said. “The government at the beginning told us to stay home, but they didn’t provide anything for us.”

Half the direct assistance provided by the United Nations since the beginning of the operation for Mosul has been distributed to those in the city, said Lise Grande, the organization’s humanitarian coordinator for Iraq.

“We are very worried that we are going to run out of supplies,” she said. “We only have limited amounts of stocks, and if everyone near and inside Mosul requires help, we won’t have enough — not by a long shot.”

[Iraq has never seen this kind of fighting in its battles with ISIS]

The United Nations and its partners are providing food parcels to sustain families for a month — after which the government’s food-distribution system is supposed to take over. “We’re hoping this happens, because in many locations the first month is nearly over,” she said.

Younes Sabri, 30, left the recaptured neighborhood of Bakr this month with his mother and two children. There was no food, water or electricity, he said, and the mortar shells were still falling.

At first he had walked an hour each day to Gogjali in search of supplies to take back to his family, but then he had decided to move into the house of a friend in the neighborhood who had left for a camp when the area was engulfed in fighting.

“The humanitarian situation there was very bad. Even the basics were not available,” he said of his neighborhood.

But like others, he is wary of the camps, because once people are there, they are not allowed to leave, not even if their neighborhood has been retaken.

“People of Mosul have only two options,” he said. “Either stay inside and die because of the bombing or hunger, or go to the camps — to the prison. Either way, it’s a slow death.”

Attiyah, the government minister, cited “security reasons” for restricting the movement of those in the camps.

The government’s decision to try to keep people in their homes has slowed the battle, limiting the use of heavy artillery and airstrikes. Commanders are urging Iraqi Prime Minister Haider al-Abadi to allow them to move families out of their neighborhoods temporarily to quicken the battle, but that could add to the humanitarian burden.

For the moment, people are being given the choice of whether to stay or leave.

Attiyah said he expects the situation to worsen. Security forces have retaken neighborhoods on the eastern side of the Tigris River, which carves the city in half, but have not yet entered areas on the other side.

The situation in those Islamic State-held areas is also a “tragedy,” Attiyah said. “There is no water, no electricity, and a lot of the doctors have left.”

Instead of heading to the camps, some people have fled to western Mosul. When the fighting starts there, he said, they will have nowhere to run.

Read more:

One man’s escape from an Islamic State mass execution

Islamic State has unleashed over 600 car bombs in Mosul battle

Today’s coverage from Post correspondents around the world

Like Washington Post World on Facebook and stay updated on foreign news