Nawaz Sharif was endorsed as Pakistan's new prime minister Wednesday, beginning an unprecedented third term with the country facing a daunting array of problems ranging from crippling power cuts to Taliban militancy.
Some 13 years after he was deposed in a coup and sent into exile, the 63-year-old was formally chosen by a vote in the National Assembly and will take the oath from President Asif Ali Zardari later in the day.
But any joy at his remarkable comeback will be short-lived as Sharif gets to work on a mountain of challenges, starting with an energy crisis that has hamstrung the economy and made ordinary Pakistanis' lives a misery.
Sharif will make a short speech to the National Assembly, where his Pakistan Muslim League-N (PML-N) holds a majority of the 342 seats, setting out his view on the problems facing the country.
Party officials say he is likely to lay out government priorities but not go into policy in any great detail, with a longer address to the nation expected in coming days.
The new premier has said tackling energy shortages, which rob the Pakistani economy of up to four percent of GDP, will be a priority and he has vowed to build new power plants.
Years of mismanagement, under-investment and corruption in the power sector have led to blackouts of up to 20 hours a day in the blistering heat of summer, when temperatures reach up to 50 Celsius (122 Fahrenheit).
Analyst Imtiaz Gul said he expected a sober, conciliatory approach to government from Sharif.
"The enormity of the challenges that he faces and that confront Pakistan today will likely make him change his style of politics even if he does not want to," Gul told AFP.
Another key challenge will be dealing with the homegrown militants of the Pakistani Taliban, who have waged a bloody campaign against the state in recent years, killing thousands of their fellow citizens.
Sharif has said he wants peace talks with the Taliban, but last week their second-in-command was killed in a US drone strike. The all-powerful military has also voiced deep scepticism about the idea of doing deals with the militants.
Sharif publicly criticised the drone strike that killed Taliban deputy Waliur Rehman, seen as a relatively moderate voice in the movement, echoing long-held Pakistani complaints that the US campaign violates national sovereignty.
Ties with Washington will be crucial, as always for Pakistan, particularly as NATO withdraws the bulk of its forces from neighbouring Afghanistan by the end of next year after more than 12 years of war.
PML-N scored a comfortable win in the May 11 general election as Zardari's Pakistan People's Party (PPP) was routed, blamed by voters for five years which saw the hated power shortages worsen and militancy continue almost unabated.
But the very fact that the PPP completed its five-year term was seen as important in a country that has suffered three coups and been ruled for more than half of its 65-year history by the military.