ISLAMABAD, Pakistan — When Imran Khan is sworn in as the prime minister of Pakistan on Saturday, he will be confronted by daunting challenges.

The country has a balance-of-payments crisis. The judiciary is in a hyperactivist mood. The effects of climate change are being keenly felt, with a major water-supply crisis. Hard-won gains against a decade-long terrorist campaign have to be consolidated.

Many Pakistanis, including senior military officials, blame an incompetent and venal political class for Pakistan’s chronic problems, from economic vulnerabilities to anxieties about security. They have been yearning for a messiah-like figure who can turn Pakistan into a financially autonomous and militarily robust nation that is respected globally. They see Mr. Khan as that man of destiny.

In his victory speech, Mr. Khan offered a glimpse of how he will rule. Having built his politics on an anti-corruption platform, he expressed hope that a transparent and accountable leader will increase global confidence in Pakistan. He intends to bank heavily on the Pakistani diaspora, which is already a major source of remittances.