Pakistan has a new prime minister, Imran Khan, best remembered from the 1990s as captain of the country’s cricket team, and as a socialite on the London club scene. His election marks a change of direction for a country which, when not under military rule, has usually chosen leaders from the Bhutto or Sharif families.

Imran Khanused to be celebrated as a cricket superstar. Until now his greatest achievement was to lead Pakistan to victory in the Cricket World Cup in 1992. When he wasn’t succeeding on the cricket pitch he was to be found on the London party scene, often pictured together with a pretty woman in the popular newspapers.

Twenty-twoyears ago Khan, now aged 65,tried to shed his image as a playboy, returning to the country where he was brought up. He funded a series of cancer hospitals in memory of his mother - firstly in his home city of Lahore. Further hospitals followed in Peshawar, centre of Khan’s Pashtun tribe, and in Karachi, Pakistan’s largest city. These won him popular support and paved the way for him to enter politics.The one-time “party animal”joined aworld where the only party that matters was a political party.

He founded the Pakistan Tehreek-e-Insaf, or Movement for Justice, known by the acronym PTI, with a mission to clean under the slogan “an end to corruption”. He won his party’s first seat in the national assembly in 2003, and his PTI party gained enough support to lead a coalition government in the mainly Pashtun province of Khyber Pakhtunkhwa.

It took another 15 years for PTI to capture power at the centre. On July 25 it won 116seats to become the largest party in the national assembly – but short of the absolute majority needed to rule on its own – pushing into second and third places the parties that have dominated Pakistan for several decades.

The Pakistan Muslim League (PML-N) of former Prime Minister Nawaz Sharif,blamed “pre-poll ballot rigging” for their poor showing. Also indignant at its poor result was the other leading contender, the Pakistan Peoples Party (PPP), previously led by the late Benazir Bhutto, another former prime minister.Rejecting charges of “ballot-fixing”, the Election Commission of Pakistan said the election was “free and fair”.

These two partieshave,surprisingly, sunk their long-standing differences and vowed to work together in the assembly to oppose a PTI-led government. Khan needswill rule with the support of coalition partners from smaller parties and independents to bring his tally of elected assembly members above the 137 seats needed for a clear majority.

The election campaign focused on alleged corruption by previous rulers with Khan promising to “end corruption within 90 days”. He also promised to build “an Islamic welfare state” though, with the country close to bankruptcy, it is not clear how he will fund this. These and other promises, like that to repeal draconian blasphemy laws, will be harder to fulfil because of Khan’s dependence on small political parties, including some favouring a staunchly Islamic agenda.

This is only the second time an elected government has handed power to another party after an election. More usually the Pakistan army has ousted elected governments in coups d’état, holding power for 33 of its 71 years as an independent nation, so any democratic transfer of power is considered a success.

Another milestone reached by Khan is to have defeated the two families which have dominated Pakistani politics since the 1970s.Nawaz Sharif of the PML-N,was deposed as prime minister last year when the Supreme Court found him guilty of corruption, following revelations in the Panama Papers about illegally-held foreign assets. Shortly before the election, Sharif was sentenced to 10 years imprisonment.His brother, Shebhaz, chief minister of the dominant province of Punjab, was due to succeed Nawaz as prime minister, a plan now thwarted by the popular vote.

Leading the Pakistan People’s Party was Bilawal Bhutto Zardari, the son of Benazir Bhutto and grandson of Zulfikar Ali Bhutto, who founded the party in the 1970s. Zulfikar served as Pakistan’s president then prime minister before being deposed by the army and executed. Benazir Bhutto twice held the post of prime minister before being assassinated while campaigning forthe 2008 election. Bilawal’s father, Asif Zardari, served as Pakistan’s president and was later imprisoned for corruption.

With corruption charges afflicting both the PML-N and the PPP, Imran Khan’s election promise to end corruption had popularappeal. Voters may have regarded his lack of experiencein government positively.Claims in a new book by one of his ex-wives, Reham Khan, that her former husband fathered several illegitimate children and became a drug user after breaking up with his first wife, British heiress Jemima Goldsmith, appear to have had little effect on voters in this deeply conservative country.

Dynastic politics may have ended for now, but it is less certain whether military interference in politics has ended. Both main losing parties say the army helped Imran Khan’s campaign. Nawaz Sharif went further accusing the army of orchestrating his dismissal as prime minister in a “soft coup” and engineering his subsequent jailing. To the army "I was becoming a stumbling block in some matters," he says. Army chief General Qamar Javed Bajwadenies these claims.

There is no doubting the enormous influence wielded by army leaders and those in charge of its intelligence arm, the ISI, especially in policy towards Pakistan’s neighbours.It has been accused of supporting the Taliban in Afghanistan, leading President Donald Trump to cut US aid to the Pakistan military last year saying it has “given us nothing but lies and deceit” and provided “a safe haven to the terrorists we hunt in Afghanistan.”

Pakistan’s army is also implicated in the country’s hostile relations towards India over the disputed territory of Kashmir, which has several times burst into open warfare since the two nations separated at ‘Partition’ on becoming independent from Britain.

Less contentious arePakistan’s warm relations with China which has been aiding the underdeveloped nationwith the China Pakistan Economic Corridor (CPEC)which will connect China to the Pakistan port of Gwadar, close to the opening of the Persian Gulf, giving China a faster route to and from the Gulf. This investment, worth at least $62 billion, is part of China’s Belt and Road Initiative (BRI).

Partly as a result of CPEC-related projects, Pakistan is running more and more into debt. Imran Khan is expected to seek a bail-outfrom the International Monetary Fund (IMF) to the tune of $12bn. Hemay face opposition from the US whose Secretary of State Mike Pompeo warned that “tax dollars” from the US, the IMF’s major funder, must not be used “to bail out Chinese bondholders or China itself”. Critics of the previous government’s borrowing from China say the country is so deeply in debt to the Chinese as to be virtually a vassal state.

Imran Khan would find it difficult to cancel road building and power station projectsas they are popular. Power ‘outages’ or ‘load sharing’ – metaphors for blackouts – have diminished in major cities since Chinese construction workers arrived in large numbers. Khan calls the CPEC “a huge opportunity to drive investment into Pakistan” but may be forced to cancel some of its more costly elements.

Pakistan has never been easy to rule. Managing a stable coalition government involving several small parties will be a hard task. A greater challenge will be that of facing up to the army and exercising power in this nation of 206 million peoplewhere civilian rule has not always been the norm.

To subscribe to the magazine please access our subscription page here