ISLAMABAD (AFP) - Pakistan's next government will face myriad challenges, from unsustainable population growth to simmering extremism, all complicated by the decades-long tussle between civilian and military leadership.
No matter who is voted into office on Wednesday (July 25), the new rulers will have to make hard choices, and quickly.
Here is a rundown of the biggest hurdles Pakistan is facing:
Security has dramatically improved across Pakistan following a crackdown on militant groups in recent years.
But analysts have long warned that Pakistan is not tackling the root causes of extremism, and militants can still carry out spectacular attacks.
That includes during this election season, with a string of bombings at political events killing more than 180 people, including the second-deadliest militant attack in Pakistan's history.
Analysts have warned that insurgents may be regrouping and seeking to reassert themselves after years of setbacks.
Pakistan's next government faces growing fears of a balance of payments crisis, with speculation mounting it will have to seek its second bailout in five years from the International Monetary Fund.
The central bank is burning through foreign exchange reserves and devaluing the rupee, including another five per cent dive this month, in a bid to bridge a widening trade deficit.
Pakistan, which has long relied heavily on imports, increased its procurement of materials to help build a string of Chinese-backed infrastructure projects under a multi-billion-dollar investment package with Beijing.
The terms of the projects are opaque, leading to fears about Islamabad's ability to pay for them.
The economy has also been stung by higher oil prices.
Meanwhile, meagre exports such as textiles have taken a hit from cheaper products by regional competitors, including China, while foreign remittances - a major contributor to the economy - have also slowed.
The winner of the election will have "limited time" to act, Fitch ratings agency warned earlier this month.
3. POPULATION GROWTH
Conservative Pakistan, with its limited family planning, has one of the highest birth rates in Asia at around three children per woman, according to the World Bank and government figures.
That has led to a five-fold increase of the population since 1960, now touching 207 million, draft results from last year's census show.
The boom is negating hard-won economic and social progress in the developing country, experts have warned.
To add to the problem, discussing contraception in public is taboo in Pakistan.
Analysts say unless more is done to slow growth, the country's natural resources - particularly drinking water - will not be enough to support the population.
4. WATER SHORTAGES
Pakistan is on the verge of an ecological disaster if authorities do not urgently address looming water shortages, experts say.
Official estimates show that by 2025, the country will be facing an "absolute scarcity" of water, with less than 500 cubic metres available per person - just one-third of the water available in parched Somalia, according to the UN.
Pakistan has massive Himalayan glaciers, rivers, monsoon rains and floods - but just three major water storage basins, compared with more than a thousand in South Africa or Canada.
As such, surplus water is quickly lost.
Political initiative will be essential to build infrastructure to reverse the course of the impending crisis. There is also little in the way of public education on water conservation.
5. CIVIL-MILITARY RELATIONS
Pakistan has spent roughly half its nearly 71-year history under military rule, and the imbalance of power in between civilian governments and the armed forces has long been seen as an impediment to democracy and progress.
Hope surged in 2013 as the country saw its first-ever transition of power from one democratically-elected government to another.
But since then, experts have warned of a "creeping coup", fuelled by tensions between the generals and the government of three-time premier Nawaz Sharif, largely attributed to his desire to assert civilian supremacy and seek warmer relations with arch-rival India.
Sharif, ousted in 2017 and arrested for corruption earlier this month, says he and his party are being targeted by the military.
Activists and several prominent journalists have also accused the military of trying to install a pliant civilian government through pressure on politicians and the media. It denies the allegations.
The next government will be tasked with meeting the country's challenges without upsetting this delicate balance of power.