Former Pakistani Prime Minister Imran Khan's 10-year jail sentence under the official secrets act is the latest in a series of ups and downs for the charismatic cricket star who is barred from elections next week but looms large over the country's politics.
Khan, 71, has been fighting dozens of cases since he was ousted from power in a parliamentary vote of no confidence in 2022. He was sentenced to three years jail in a corruption case in August, which has ruled him out of the Feb 8 general elections.
Opinion polls early last year said Khan was the South Asian nation's most popular leader. A brief arrest in May on separate corruption charges sparked deadly unrest across the country at a time of economic crisis.
He has denied any wrongdoing, telling Reuters in June the military - which has ruled Pakistan for most of its history since independence in 1947 - and its intelligence agency were trying to destroy his political party.
The military, which controls some of the nuclear-armed nation's biggest economic institutions, has said it is neutral towards politics.
Once criticised as being under the thumb of the generals, Khan had a falling out with the then-army chief, General Qamar Javed Bajwa, which led to his ouster.
He has said the army, now under General Asim Munir, still targets him and his party, charges the army denies.
The violence after his May arrest may have brought tensions to a head with the military, as his supporters ransacked army establishments in multiple cities.
Some leaders of Khan's political party quit after the violence. Thousands of party workers also remain under arrest, the party says.
In 2018, the cricket legend who led Pakistan to its only World Cup win in 1992, rallied the country behind his vision of a corruption-free, prosperous nation respected abroad. But the firebrand nationalist's fame and charisma were not enough.
Khan rose to power more than two decades after he launched Pakistan Tehreek-i-Insaf (PTI), the Pakistan Movement for Justice party. Despite his fame and status as a hero in cricket-mad Pakistan, PTI languished in Pakistan's political wilderness, not winning a seat other than Khan's for 17 years.
In 2011, Khan began drawing huge crowds of young Pakistanis disillusioned with endemic corruption, chronic electricity shortages and crises in education and unemployment.
He drew even greater backing in the ensuing years, with educated Pakistani expatriates leaving their jobs to work for his party and pop musicians and actors joining his campaign.
His goal, Khan told supporters in 2018, was to turn Pakistan from a country with a "small group of wealthy and a sea of poor" into an "example for a humane system, a just system, for the world, of what an Islamic welfare state is".
He won the election, a sporting hero at the pinnacle of politics. Observers cautioned, however, that his biggest enemy was his own rhetoric, having raised supporters' hopes sky high.
Born in 1952, Khan grew up with four sisters in an affluent urban Pashtun family in Lahore, Pakistan's second-biggest city.
After a privileged education, he went on to the University of Oxford, where he graduated with a degree in Philosophy, Politics and Economics.
As his cricket career flourished, he developed a playboy reputation in London in the late 1970s.
In 1995, he married Jemima Goldsmith, daughter of business tycoon James Goldsmith. The couple, who had two sons, divorced in 2004. A second marriage, to TV journalist Reham Nayyar Khan, also ended in divorce.
His third marriage, to Bushra Bibi, a spiritual leader whom Khan came to know during his visits to a 13th century shrine in Pakistan, reflected his deepening interest in Sufism - a form of Islamic practice that emphasises spiritual closeness to God.
Once in power, Khan embarked on a plan of building a welfare state modelled on what he said was an ideal system dating back to the Islamic world some 14 centuries earlier.
But his anti-corruption drive was heavily criticised as a tool for sidelining political opponents - many of whom were imprisoned on charges of graft.
Pakistan's generals also remained powerful and military officers, retired and serving, were placed in charge of more than a dozen civilian institutions.
Khan was pushed out as premier in April 2022 amid public frustration at high inflation, rising deficits and endemic corruption that he had promised to stamp out.
The Supreme Court overturned his decision to dissolve parliament, and defections from his ruling coalition meant he lost a subsequent no-confidence vote.
With that, Khan became the latest in an unbroken line of elected Pakistani prime ministers who did not serve their full terms.