The UN is scrambling to find enough land to shelter those displaced by the fighting to retake Mosul from the Islamic State group as humanitarians brace for the exodus of as many as 700,000 people from the city, an official said Wednesday.

Bruno Geddo, the UN's top humanitarian official in Iraq, told The Associated Press that there is currently enough space in camps for 180,000 people.

"That is the thing that makes us somehow sleepless at night. You cannot be complacent when you still one million people inside the city. It is bound sooner or later that you may have tens of thousands of people who come out in flash outflow," he exlained.

Geddo said he and his colleagues were haunted by the memory of Fallujah where some 65,000 people fled the city over three days during an operation to retake the city from IS in June, quickly overwhelming humanitarian efforts.

He says the UN has learned from that experience and that so far he was pleased that Iraqi forces appeared to be doing their utmost to avoid civilian casualties. The downside of protecting civilians, however, is that slows down operation just as winter is approaching and the prices of water of and fuel are skyrocketing.

"In the end, the choice is theirs. It is a very stark choice. They may be hit by a land mine or a sniper, ISIS has a policy of killing anybody trying to flee. They may be caught in the crossfire, but if they stay they may also be reached by rockets and otherwise they may be facing penury over the full winter," Geddo said, using an acronym to refer to the Islamic State group.

As of Tuesday, some 82,000 people have fled the city since the military offensive began on Oct. 17, Geddo said, adding that 81 per cent of them are currently in camps some 40-80 miles outside the city.

In order to solve the problem, he said, the UN is now considering building camps closer to the city which has the advantage of allowing displaced people to simply walk in.

"Because the camp capacity has now more or less reached its limit, we are now planning to use the fact that the front lines have gotten closer to the city to try and build camps much closer to the city so in the event of a mass outflow, these camps would act as buffers," Geddo said.

Much of the land around Mosul is contaminated with unexploded ordinance and other detritus of war. In other areas, local communities are likely to violently reject the displaced for being Sunni Muslims. And then other potential areas hold mass graves, which make them unsuitable out of respect for the dead, Geddo said.

Another problem is a lack of funding as the UN has so far received only about half of the $284 million it estimates it needs to deal with the people displaced by the operation.