ISLAMABAD: Pakistan's World Cup cricket hero Imran Khan is set to become prime minister of the nuclear-armed nation of 207 million, with an economy inching toward crisis and perennial conflict on its borders.
Running the country will take considerable statecraft from Khan's relatively inexperienced party. He brings charisma, international name recognition and a sizeable election victory, though not enough to form a majority government.
But critics say his star is diminished by sympathy towards extremists, and the unsportsmanlike nature of his win, which is widely alleged to have been fixed for him by Pakistan's generals.
Here is a rundown of the issues Khan and his Pakistan Tehreek-e-Insaf (PTI) party will face once at the political crease.
Khan has spent much of his political career as a populist agitator promising change rather than actually passing laws.
"Imran Khan has been his own man. He doesn't even go to parliament," said political commentator Fasi Zaka. "He's been practised in protest for five years."
PTI, meanwhile, has only ever governed in a provincial setting. The learning curve at the national level will be steep.
His success could depend on the coalition his party manages to form, and whether the outgoing Pakistan Muslim League-Nawaz and once-powerful Pakistan People's Party (PPP) end up joining hands in opposition.
Analysts have said it should be straightforward for Khan to form a coalition with independents and small Islamist parties, as they know he is favoured by the powerful military.
But he has already created unease by pandering to Islamists during the campaign, and such a coalition could fuel fears his government will cater to the religious right.
To Khan's rivals, he is the military's "blue-eyed boy".
However he will not be the first premier to take office on good terms with the armed forces. The fate of the last elected prime minister Nawaz Sharif, once favoured by the generals only to be ousted and jailed, should prove a cautionary tale.
There have long been questions over the extent to which the military, which has ruled Pakistan for roughly half its history, wanted to work with the mercurial Khan -- and how much it simply wanted to install a pliant government that -- unlike Sharif's -- would not challenge its power and policies.
"When he wants to wield power, does it converge with the military or clash?" asked retired general and analyst Talat Masood. "I think it's a big question mark."
All indicators suggest Khan's government will immediately have to approach the IMF for what would be the country's 13th bailout from the fund.
"Exports are down, debt is up, the macro indicators are pretty poor," said Sehar Tariq with the US Institute of Peace.
But an IMF bailout would likely hamper his aim of creating an Islamic welfare system, at least in the short-term.
The other option may be further borrowing from China.
But there are already concerns about Pakistan's ability to hold up its end of an opaque deal that is seeing Beijing pour billions in investment into the country.
When Khan first entered politics in the mid-90s, his goals were straightforward -- rein in endemic corruption and weed out the venal political elite.
But before the election he stirred controversy by bringing in so-called "electables" -- politicians with huge vote banks but without clean records on corruption. Catering to theses electables and newly-minted coalition partners while trying to excise corruption may prove difficult.
PTI has also vowed to force Pakistanis to pay their taxes -- but there is a long way to go, with only around one percent of the population complying.
"People don't pay taxes because they see how our ruling elite spends that money," said Khan during a victory speech last week.
"I will protect the people's tax money."
Pakistan is surrounded by enemies, has fallen out with its tenuous ally the US and has become overly dependent on its relationship with Beijing, some analysts say.
Khan has already vowed to rebalance Islamabad's relationship with the US, months after US President Donald Trump suspended security aid over Islamabad's alleged failure to target militancy along its borders.
But, said Tariq, "the road to better relations with Pakistan and the US is not a direct road... it goes through Afghanistan."
And Afghanistan may prove a sore spot.
Khan has criticised the role of the US there in the past, which is not likely to endear him to Washington now.
He has also called for open borders -- a stark contrast to his military's highly-publicised efforts to build a costly fence to seal the frontier.
Khan has also vowed to improve trade with arch-rival India and discuss disputed regions such as Kashmir, while reaching out to Beijing by invoking China as an example in his victory speech.