ISLAMABAD, Pakistan — For a nation often in the news for all the wrong reasons — suicide bombings, horrific school massacres — Pakistan has reached a turning point that could possibly alter its dysfunctional trajectory.
Imran Khan, the cricket star and A-list celebrity whose political party won this past week’s elections, could use his fame and charisma to reset Pakistan’s troubled relations with the West.
Mr. Khan also may move Pakistan much closer to the expanding sphere of China, a neighbor he has praised conspicuously as a role model.
Or Mr. Khan could simply follow the same path as many Pakistani leaders before him, supporting harsh Islamic laws and showing sympathy for militant groups, policies that have kept Pakistan isolated for years.
Still, Mr. Khan brings something new: more star power and mystique than any recent Pakistani leader and perhaps a better chance to change the country’s narrative, even though the election was widely considered tainted.
“Relatively few Pakistani leaders have won over the West,” said Michael Kugelman, deputy director for the South Asia Program at the Woodrow Wilson Center in Washington. “But Khan is familiar with operating in the international world. He already has strong name recognition. He doesn’t need to be introduced.”
Oxford-educated and once married to a wealthy British woman, Mr. Khan is clearly comfortable in the highest circles of Western power brokers. He was close friends with Princess Diana. (Shortly before she died, Mr. Khan has said, he was trying to help her find a new husband.)
Still, the old Mr. Khan is not necessarily the new Mr. Khan. In recent years, he has undergone a complex metamorphosis, distancing himself from his days as a star athlete and ladies’ man. He now expresses sympathy for the Taliban and for Pakistan’s harsh blasphemy laws, which include the death penalty, positions that play well domestically.
“He’s dangerously accommodating of extremists, and anyone who knows him knows this,” said C. Christine Fair, a political scientist at Georgetown University.
The dust has hardly settled from the election, which was marred by allegations of rigging and copious evidence that Pakistan’s military interfered to help Mr. Khan win. Mr. Khan’s party trounced the others, but as of Sunday remained short of a majority in Parliament.
To become prime minister, he needs to win over independent candidates and smaller parties to build a coalition. Most analysts believe he will succeed, although it is not a sure thing.
In many ways, Pakistan is a pivotal nation. It is the world’s sixth-most populous country, with 200 million people. It is also nuclear-armed and strategically located next to India, China, Iran and Afghanistan.
For decades it has been cast in turmoil by suicide bombers, extremist groups and a nefarious spy agency that helped create the Taliban and actively supported Al Qaeda while ostensibly serving as an ally to the United States.
But many parts of the country are safer today than they were a few years ago. New malls, new schools and new Dunkin’ Donuts outlets are going up. And now Pakistan is poised to get a new global salesman.
It is widely expected that if Mr. Khan, 65, becomes prime minister, there will be an initial fascination with him as he tours the world. Most likely, he’ll visit foreign capitals and business titans, seeking help to solve Pakistan’s dire debt crisis and bring in investors. He also seems to have China in mind.
In an address to the nation last week, Mr. Khan mentioned China no fewer than seven times, praising it for lifting millions out of poverty and for fighting corruption. “God willing,” he said, “we’ll learn that from China.”
In another unsubtle signal, his party posted a Twitter message in Chinese extolling China’s achievements and promising improved ties.
Pakistan is hurtling toward possible default and insolvency, and China has already lent it billions of dollars for new roads and railways, at discounted rates. Two days after Mr. Khan’s speech, Pakistani newspapers reported that China would lend the incoming government $2 billion more for “breathing space.”
But assuming Mr. Khan finally gets the prime minister job, he will be entering the inner sanctum with the whiff of scandal.
By all accounts his election victory was far from fair. Human rights groups, academics, Western diplomats and political analysts have said that Pakistan’s army and security services, often referred to here obliquely as “the Establishment,” systematically targeted Mr. Khan’s political rivals in the months before the election, helping him win. But the Establishment chiefs may now be kicking themselves for doing a job too well.
They seem to like Mr. Khan, for the time being, partly because his forcefulness with the United States and tolerance of Islamist extremists reflect how many of Pakistan’s top officers feel. The Establishment feels burned by Mr. Trump, who slashed military aid to Pakistan, and miffed by the broader shift the United States is making to embrace India, Pakistan’s enemy, as a check on China.
But installing Mr. Khan, analysts say, was not the Establishment’s primary goal. Pakistan’s military has directly ruled for much of its history and meddled during the rest. What the military bosses really wanted this time, analysts say, was a weak civilian government, with the veneer of a democracy. They were so heavy-handed in their tactics they ended up getting neither.
In the months before the election, security services intimidated, blackmailed, arrested and prosecuted the leaders of the governing P.M.L.-N. political party, many observers have said, culminating in the jailing of the party’s leader, Nawaz Sharif, a three-time prime minister, less than two weeks before the vote.
On Election Day, Mr. Khan’s rivals say, soldiers guarding the polls restricted access to ballot counting rooms, raising suspicions of more foul play.
With the competition so thoroughly eviscerated and Mr. Khan genuinely popular, especially among the youth, he now would surge into office with a strong national following. According to the latest updated results released this weekend, his party won nearly four million more votes than its nearest competitor, the P.M.L.-N. Mr. Khan’s party commands a huge lead in the National Assembly with more than 100 seats, compared with P.M.L.-N. at around 64; it also performed well in provincial assemblies.
What this all means is that Mr. Khan, whose success seems partly a creation of the military, might not be so easy to control.
“Khan might be more inclined to butt heads,” said Marvin Weinbaum, a scholar at the Middle East Institute and former State Department intelligence analyst. “The difference with Imran is going to be because he’s a populist, he feels he can go further than Nawaz.”
Conflict with the Establishment, Mr. Weinbaum said, is “almost inevitable.”
Mr. Khan’s erratic personality is a further complication. He is known for running a team of one, making impulsive decisions, contradicting himself and then using his enormous reserves of self-confidence and charisma to dig himself out.
Take his views on religion. He has said that he wants to reform the madrasa system in which countless young Pakistani boys have been brainwashed in Quranic schools to fight for extremist groups. At the same time, Mr. Khan has supported Pakistan’s blasphemy laws and teamed up with hard-line religious groups that a few years ago rioted in Islamabad, the capital.
His sprawling villa on Islamabad’s outskirts, where he spends much of his time, symbolizes his guarded nature. The enormous compound, occupying a craggy hilltop, is tucked behind high walls. At night, you can see thousands of lights from Islamabad twinkling in the distance far below. Even though he’s still officially only one of hundreds of members of Parliament, several dozen police officers this weekend blocked the roads leading to his house and stood in clumps at his gates as if he were already prime minister.
To Western governments, Mr. Khan’s idiosyncrasies may not even matter that much. Analysts say there are only two issues the West really cares about in Pakistan: militant groups and nuclear arms. Mr. Khan will not have much say in either. The military and intelligence establishment handles both.
The biggest issue that Mr. Khan will control is the economy. This is where he could shine as a leader or quickly be subsumed. Pakistan is facing a balance of payments crisis, its currency has rapidly devalued, its debt is soaring.
Economists say the steps the next prime minister must take are obvious but painful. The national budget (including the military’s) needs to be cut, Pakistanis must pay more for energy, old state-run businesses need to be privatized and taxes — many more taxes — need to be collected.
According to the Pakistani government, last year less than one million out of Pakistan’s 200 million people paid taxes.
Mr. Khan remains most focused on getting the numbers he needs in Pakistan’s Parliament to form a coalition government with him as prime minister. So far, some smaller parties have indicated they will join, but he still has a way to go.
The third-place party, the Pakistan Peoples Party, has been coy about whether it will join Mr. Khan’s side or oppose him. If it did join, that would easily push Mr. Khan’s coalition into the majority.
Most Pakistanis, even those who did not vote for Mr. Khan, believe he will be the next prime minister. Expectations are soaring that he will be able to change his country’s image.
“Everybody thinks of Pakistan as a terrorist world,” said a 16-year-old girl named Mahnoor, who was sitting in the food court of a fancy new mall this week, eating McDonald’s French fries. “It’s not.”
Naveed Majeed, a rice exporter, said foreigners would listen to Mr. Khan because he brings something of an aura.
“And I want him to tell the world we’re not all terrorists,” Mr. Majeed said.
It’s clearly a sensitive subject; many Pakistanis ache for a new story for their country.
Mr. Khan would not be the first Pakistani prime minister with a westernized history. Benazir Bhutto, killed in a suicide bombing in 2007, was elegant, beautiful and a bit of a global fascination as well. She also spent years in England (and the United States). But she failed to radically transform the way most outsiders viewed her homeland.
Part of the reason, said Anatol Lieven, a senior researcher at the New America Foundation, was that Westerners initially saw Ms. Bhutto through a narrow lens as a British-educated upper-class liberal woman.
“They missed everything else about her family, the nature of politics in Pakistan,” he said. “These people are part of systems.”