Former international cricket star Imran Khan had vowed to lead the country a second time after being ousted as prime minister in 2022, but two lengthy prison sentences in a week have put paid to his chances -- for now at least.

Khan and his wife were sentenced on Wednesday to 14 years in prison after being convicted of graft in connection with gifts he received while premier from 2018 to 2022.

A day earlier, he was found guilty of leaking state secrets and jailed for 10 years.

With national elections one week away and his party severely hamstrung by the military establishment, it would be easy to write off the charismatic 71-year-old's political career.

But Khan won cricket matches from seemingly impossible positions as national captain, and Pakistan has seen dozens of politicians sentenced to lengthy prison terms only to see them overturned when they are back in favour.

That Khan remains wildly popular is not in doubt, but the fate of the Pakistan Tehreek-e-Insaf (PTI) party he founded is uncertain without him at the helm.

Many senior leaders are also locked away, or have abandoned the party following a major crackdown by the country's powerful military, vastly diminishing his street power.

The party was also stripped of its cricket bat symbol -- vital in elections in a country where adult literacy is just 58 percent.

After being booted from power in April 2022 by a no-confidence vote, Khan waged a risky and unprecedented campaign of defiance against the military he blamed for ousting him.

That anger spilled onto the streets in May after he was arrested for the first time, sparking three days of sometimes violent protests.

At the time he was still recovering from an assassination attempt which saw him shot in the leg -- an attack he blamed on his successor, Shehbaz Sharif, and a senior army officer.

Both denied involvement, and Khan did not offer evidence of his allegations.

- Popular support -

Khan enjoyed genuine popular support when he became premier in 2018, but critics say he failed to deliver on promises to revitalise the economy and improve the plight of the poor.

He was voted in by millions who grew up watching him play cricket, where he excelled as an all-rounder and led the nation to World Cup victory in 1992.

PTI overturned decades of dominance by the Pakistan Peoples Party and Pakistan Muslim League-N -- two usually feuding groups that joined forces to oust him in April 2022.

Khan's vision was for Pakistan to become a welfare state modelled on the Islamic golden age of the seventh to 14th centuries, a period of cultural, economic and scientific flourishing in the Muslim world.

But he made little headway in improving Pakistan's financial situation, with galloping inflation, crippling debt and a feeble rupee undermining economic reform.

He also went after his political opponents, with many prominent PPP and PML-N leaders jailed for corruption during his tenure. Some have been released or seen the cases against them evaporate since he left power.

Rights groups also decried a crackdown on media freedoms under his rule, with television news channels unofficially banned from airing his opponents' views.

Today, with the tables turned, he faces many of the same curbs.

The crucial blow to his premiership was a reported falling out with the military, the country's kingmakers who can control the rise and fall of any government.

- Tiptoed into politics -

The Oxford-educated son of a wealthy Lahore family, Khan had a reputation as a playboy until his retirement from international cricket.

For years he busied himself with charity projects, raising millions to build a cancer hospital to honour his mother.

He tiptoed into politics and for years held the PTI's only parliamentary seat.

The party grew during the military-led government of General Pervez Musharraf and the civilian government that followed, becoming a genuine force in the 2013 elections before winning a majority five years later.

Married three times, his current wife Bushra Bibi -- who was also jailed for 14 years on Wednesday in the same graft case -- comes from a politically prominent family and is a religious leader.

Often described as being impulsive and brash, Khan draws frequently on cricket analogies to describe his political battles.

"This trial is not a trial but a fixed match," he said in a message posted on his X account following Tuesday's sentencing.