Fighters from predominantly Sunni Arab forces take part in a training session before the battle to recapture Mosul. Photograph: Thaier Al-Sudani/Reuters

A ground assault on Mosul, the last major Islamic State stronghold in Iraq, is due to be launched by the end of the month, as Iraqi troops who will lead the attack move into their final staging positions to the south of the city.

Officials in Baghdad expect the push to begin close to 15 October, although US officials who have trained and advised Iraqi forces for the past two years are understood to be less focused on a fixed date and are making plans for the battle to start up to 10 days later.

But, while victory over the terror group appears certain, gnawing doubts remain over what comes next.

While military moves are well advanced, the questions of how to provide for up to 1.3 million refugees, or how to re-establish governance in a city brutalised by two years of tyranny is increasingly consuming aid agencies and regional officials, some of whom believe that whatever emerges from Mosul will determine the fate of Iraq.

Sectarian concerns have dominated pre-battle planning, with Shia militias and Kurdish Peshmerga forces who have played vital roles in the war against Isis not slated to enter the largely Sunni Muslim city. The Iraqi military, which is largely made up of Shia soldiers and officers, will take the lead in the battle, with up to three divisions – roughly 45,000 men – advancing from positions near the Qaiyara air base 30 miles south.

Isis is thought to have around 5,000-8,000 members prepared to defend their last redoubt in Iraq, where it all began for the latest incarnation of the group in June 2014, when Isis leader Abu Bakr al-Baghdadi used the city’s Nouri mosque to declare the establishment of a Caliphate and himself as leader. Ever since, Mosul has been central to the group’s ambitions to spread its ruthless understanding of Islamic law throughout the Arab world and beyond.

An Iraqi security source said: “When you have one million people you have to be precise with each attack; it requires really good intelligence that will slow things down. Anyone who says it is going to take two weeks or two months does not know. We will see early on when the process has started, but we do not want to end up like Ramadi with 80% of the city destroyed, and then mass unemployment because that is a breeding ground for terrorism. You could just end up with a more brutal version of (Isis).”

Officials in Baghdad, Washington and Erbil expect a long and difficult fight, complicated by the widespread laying of mines and explosives – on a much larger scale than seen in other cities seized and then lost by Isis earlier in the war, such as Tikrit, Ramadi and Falluja.

More pressing, though, is how to cater for what will potentially be the largest single refugee exodus at any point since mid-2104. Up to 500,000 residents are expected to move into Kurdish controlled areas to the east, while at least 500,000 more could flee to areas controlled by the Iraqi military to the south or west.

Unicef says more than 213,000 people have fled the city since May this year, and more than 3.3 million people have been displaced across Iraq since early 2014.

“More than 700,000 people are likely to require shelter and other life-saving assistance,” said Unicef Middle East and North Africa spokesperson, Farah Dakhlallah. “Families are undertaking terrifying journeys through active conflict zones littered with unexploded ordnance and improvised explosive devices, often at night, sometimes walking up to 60km to escape to safety.”

Unicef says its aid efforts are $13m underfunded. Other agencies report similar shortfalls. Kurdish officials have prepared 20 refugee camps near the town of Makhmour southeast of Mosul.

Iraq’s counter-terrorism forces, which performed well in the four-week battle to retake Falluja in June, are expected to lead the fight. Peshmerga units are planning to take up blocking positions to the north and east, where they will also receive and screen refugees. The Popular Mobilisation Units, known in Iraq as Hashd al-Shabi, have been confined to a blocking role to the west of Mosul, over concerns that their presence could amplify sectarian tensions that had remained high throughout the post-Saddam years.

Those tensions had peaked before Isis swept into the city in June 2014. As the terror group arrived, Iraqi forces who had been dominated by Shia members, whom had alienated the local population, quickly surrendered the city. Restoring trust with Baghdad, or re-establishing basic governance looms as the biggest challenge of the post-Isis period.

Iraq’s central government remains weak and has little influence throughout Sunni areas of the country. The US, which maintained a presence in Mosul until 2010, no longer has an occupying presence in Iraq. Barack Obama has made clear that the 6,000 troops his administration has re-deployed are there only to fight Isis and not to provide military muscle in aid of a diplomatic push to hold the country together.

The Iraqi intelligence official said: “There is an agreement about the structure, and the order in which (forces) come in. This is the last battle in Iraq and everyone wants to be included. It was a wise move to let the Shia militia be involved but in designated areas, and under control. I don’t think after two years fighting Isis you can keep out the Shia in the last battle of Iraq.

“If we cannot reassure Sunnis they will fight to the death. There are small elements trying to assassinate (Isis), and trying to make them feel uncomfortable, but it largely depends on the tribes. We are trying to tell the Sunnis inside this is coming, and people reaching out to them and saying they have a second chance.”