Pakistan's new government led by prime minister Imran Khan faces myriad challenges. The cricketing icon turned politician will have to make hard choices, and quickly.
Here is a rundown of the biggest hurdles Pakistan is facing:
Analysts have warned the new government will have to act fast as the country teeters on the verge of a balance-of-payments crisis.
Khan's likely new finance minister, Asad Umar, has said they will decide by the end of September whether or not to go to the International Monetary Fund (IMF) for the country's second bailout in five years.
But the US, one of the IMF's biggest donors, has raised fears Pakistan could use any bailout money to repay debts to China, a suggestion Pakistan has refuted.
The budget deficit has grown steadily over the past five years, and foreign currency reserves have declined. The rupee has been repeatedly devalued, fuelling inflation.
Khan has vowed to improve trade with India, increase the ease of doing business and boost tax collection.
But the state of national finances could also undermine one of his most popular promises, his "Islamic welfare state", based on increased spending on education and health.
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 200 people, including the second-deadliest militant attack in Pakistan's history.
The new prime minister, who earned the nickname "Taliban Khan" over his willingness to hold talks with the militants, increasingly catered to religious hardliners throughout the campaign.
This has spurred fears extremists may be emboldened under his leadership.
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 fivefold 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. Analysts say unless more is done to slow growth, the country's natural resources will not be enough to support the population.
To add to the problem, discussing contraception in public is taboo in Pakistan.
Khan has not taken any clear stance on family planning in the past, and it remains to be seen how his government will tackle population growth.
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.
Political initiative will be essential to building infrastructure to reverse the course of the impending crisis. There is also little in the way of public education on water conservation.
Khan has a relatively good track record on the environment, with the "Billion Tree Tsunami" tree-planting programme in his party stronghold of Khyber Pakhtunkhwa province earning acclaim from environmental groups.
Whether he can translate that experience to a nationwide water conservation programme is not yet clear.
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 democratic transition of power.
But since then, experts have warned of a "creeping coup", fuelled by tensions between the generals and 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 in July, has said he and his party were targeted by the military. It denies the allegations.
Khan, who has already made overtures to India, insisted in parliament Friday that he had been elected without any help.
"I am standing here in this parliament on my own feet," he said.
He will have to meet the country's challenges without upsetting this delicate balance of power.