The Islamic State of Iraq and the Levant (ISIL) can no longer call Mosul its de facto Iraqi capital.

Iraqi Prime Minister Haider al-Abadi's announcement last week that ISIL, also known as ISIS, had fallen in Mosul might have been well received by the international community - but the country is still counting the costs of a campaign that has left Mosul in shreds.

In addition to the rise of an intra-Shia divide and the further breakdown of sectarian relations, analysts say the Iraqi government is struggling with mounting challenges to restore stability and security throughout the country. Humanitarians and the government know that if the rebuilding process in Mosul and its outskirts is not swift, a deeper humanitarian crisis could envelop the region.

Lise Grande, the humanitarian coordinator for the United Nations Assistance Mission for Iraq, described an initial assessment of the city as "staggering".

"There are 54 residential areas in Mosul. Of those, 15 have been completely flattened," she told Al Jazeera.

In western Mosul alone, the UN estimates it will cost upwards of $700m to restore electricity, water and sewage services, and to repair the 32,000 homes severely damaged in the nine-month-long campaign to push ISIL out of its last stronghold in Iraq.

The entire budget needed to rebuild both sides of the city would be close to $1bn, Grande said.

But without the continuous support of the international community, the government "will simply not have the sufficient funding required to rebuild the city", Shatha al-Ubousi, an adviser to the head of the Iraqi parliament, told Al Jazeera.

"The damages incurred in the state's fight against ISIL has left 80 percent of the city in ruins," she said. "Just as there was an international coalition to defeat ISIL, we now also need an international coalition to rebuild these areas."

Amid humanitarian and security concerns, there is also talk of provincial elections in September.

Political transition in the country could be a complex and problematic process due to the different factions controlling various areas. In Iraq, ethnic and tribal leaders have rallied many of the factions fighting among the Popular Mobilisation Forces (PMF), whose fighters are either loyal to religious scholars, Iraqi political leaders, or Iran's Revolutionary Guards.

Without adequate leadership representing Mosul's population and minority groups, the city's governance could wind up in the hands of state and federal police longer than expected, while militia groups establish themselves in the outskirts and surrounding regions.

The government is now unsure whether the provincial elections - a prerequisite for parliamentary elections scheduled for 2018 - will take place at all, as it faces calls to overhaul its voter law and electoral commission.

Salem Mohammed Shabak, an Iraqi member of parliament and Shabak political party representative, told Al Jazeera that the Iraqi people are "rightfully calling for an overhaul of the electoral law and commission".

"They [Iraqi people] say it is a corrupt body that forges votes. Initially, we wanted to hold elections this year, but to carry out the change we need time," he said.

According to Ubousi, elections will be postponed for at least six months if parliament votes in favour of rescheduling.

"It is in our benefit to postpone the elections. This will give us a chance to start rebuilding and reintegrating people into society, to enable the people of Mosul to partake in the elections," she said.

IN PICTURES: The final push - Retaking Mosul from ISIL

As the US-led coalition continues to battle remaining ISIL fighters in towns south and west of Mosul, the fight to reclaim the country's second-largest city has already left nearly one million people homeless. Fears of growing sectarianism in the Sunni-majority governorate of Nineveh, which includes Mosul, are on the rise.

Iraq, a country with a majority Shia population, was gripped by a series of sectarian conflicts before the rise of the Islamic State of Iraq in 2006, which later grew to become ISIL.

Under Abadi, the PMF became a state-recognised armed group of predominantly Shia fighters, who joined the current government in the fight against ISIL.

As the PMF and other militia groups remain in the outskirts of Mosul, displaced residents say they are afraid to return home. But analysts dispute whether these militias pose a threat to the government and security of the region.

While military analyst and Peshmerga Lieutenant Mohamed Saber says there is a security vacuum, Middle East Forum analyst Aymenn Jawad al-Tamimi noted that these other militia groups - who call themselves Hashd Ashairy (tribal units) and comprise fighters from a variety of ethnic and religious backgrounds - have also claimed an affiliation with the government, although they are not directly under the state's control.

"Mosul itself is a range of the army, the police, and then some of these militias … In the city itself, the militias don't actually play a role in holding security," Tamimi, who recently visited Mosul, told Al Jazeera.

"So, although they may not try to play a role in maintaining security in Mosul city [as opposed to the outskirts], they may want to establish a political presence there in the future," he said, explaining that this will most likely be the government's next real threat.

"Abadi wants to a degree to try and restrain things … In the long run, if these groups wanted to establish a political presence in the future, [Abadi is] less likely to stop that from happening."

According to Saber, Abadi does not have "real power" over the military or the various militias – such as popular Shia religious leader Muqtada al-Sadr's Peace Brigades - who report to non-state leaders.

Last year, Sadr ordered his tens of thousands of loyal supporters to target US troops fighting ISIL. Sadr has also been leading a movement that led to demonstrations against Abadi's parliament in Baghdad this year, even though both sides represent the same religious group.

The diverse makeup of the PMF's 40 divisions sheds light on many of Iraq's sectarian tensions. Although formed via a religious decree to fight ISIL in 2014 by Grand Ayatollah Ali al-Sistani, Iraq's top Shia religious scholar, many of the fighters are empowered by Iran and other non-state actors.

READ MORE: The rise and fall of ISIL explained

More than 60,000 PMF fighters are split into different religious, ethnic and national identities, most of who are empowered by Iran, rendering Abadi's government "hostage to Iran", Tamimi says.

According to Ubousi, the government recognises the presence of the various militias as a legitimate challenge to maintaining security.

"The security situation is unstable … The liberated areas need to be secured," she said. "The government seeks to hand over power to the people and local council of Mosul."

The Nineveh governorate, however, will not be partaking in the upcoming provincial elections because it is in a transitional period. Governance will remain in the hands of the coalition and the police until further notice, casting doubt among Moslawis over the intent and timeline of a transition of power.

"Among them all [internally displaced Iraqis], there is a fear of illegitimate leadership," Ubousi said.

Deep animosity among many of Iraq's minority communities in the north stems back to a campaign by late Iraqi President Saddam Hussein to shift demographics in favour of the country's Sunni population. The "Arabization" campaign lasted decades and displaced hundreds of thousands of minorities, including Kurds, Turkomen and Assyrians, from northern Iraq.

Exacerbating the divide, former Iraqi Prime Minister Nouri al-Maliki's government carried out a de-Baathification campaign after the 2003 US-led invasion of Iraq, ultimately expelling Sunnis who were Baath party affiliates from government and state-sponsored jobs. As a result, the government marginalised some 400,000 Sunni Iraqis, leading to a fully fledged civil war that had displaced one million people by 2008.

With a now Shia-dominated parliament, underrepresentation of Iraqi minorities persists. Following Hussein's removal, in an effort to create a unified Iraq, ethnic and religious minorities joined in writing a new federal, democratic constitution that was never truly implemented, Saber said.

The US-led coalition has made no announcements to date on whether the PMF would be disbanded once the fighting ends. If these militia groups become increasingly formalised, they may be difficult to uproot, triggering a new form of conflict in Iraq.

"Intra-militia fighting … already happened to a degree in Basra, which is very removed from the fighting, but it's controlled by different rival militias and gangs," Tamimi said.

With various factions taking credit for winning the fight against ISIL, and in the lead-up to the country's parliamentary election, questions abound on who may be the real saviour of Iraq.