Two years after he was ousted in a no-confidence vote, Pakistan's former prime minister Imran Khan continues to loom large over the country's politics.
Even though the 71-year-old is barred from running in the 8 February general election, he continues to be a powerful force dividing the Muslim majority country. For some of its 240 million population, he is an anti-establishment hero. To his opponents, he is power-hungry and corrupt.
Khan first rose to international fame on the cricket pitch, before shedding his playboy past and embarking on a decade-long marriage with billionaire heiress Jemima Goldsmith in a story captured in the pages of Hello! magazine.
His career in politics began soon after, but it took years for him to make a serious impression. By the time he was elected PM in July 2018 he had long cultivated an image as a pious reformer and widened his appeal with promises to fight corruption and fix the ailing economy.
Barely four years in, he was kicked out of office by opponents in parliament, making him the first prime minister in Pakistan's history to be ousted in a vote of no-confidence.
Pakistanis were frustrated that his pledges to build an "Islamic welfare state" went unmet - leaving them to pay through their noses for food. Reports also said he had fallen out of favour with the powerful military, a crucial behind-the-scenes player in the nuclear-armed country.
Imran Khan's lawyers say he is now battling more than 170 legal cases, including charges for corruption and terrorism. He calls the charges a politically-motivated attempt to keep him off the ballot.
But he still commands considerable support - tens of thousands took to the streets in cities across Pakistan on the night he was ejected from power. Supporters also came out in widespread protests - at times violent - after he was arrested in May 2023 on corruption charges. Some people even stormed army cantonments, which incensed the powerful military.
The unrest plunged Pakistan deeper into political turmoil at a time when its economy is already on life support. His detention was later ruled illegal by the courts, but in August 2023 Khan was taken into custody again after being found guilty of not declaring details about gifts he received in office.
He is appealing against a three-year jail sentence. The conviction barred him from standing in the general elections. Just a week before the vote, the sentences began piling up as the courts handed down two more jail terms in as many days to Khan, including a 14-year term for illegally profiting from state gifts. His wife Bushra Bibi was also jailed 14 years in that same case.
Earlier in January Khan's Pakistan Tehreek-e-Insaf (PTI) had suffered another serious setback when the Supreme Court upheld a decision to strip the party of its cricket bat symbol. Such symbols allow the many millions of illiterate voters to pick out their party without having to read a name.
But Khan has shown no signs of wanting to leave politics. The PTI said its candidates are determined to stand in the vote, even if they have to do so as independents. Its leader continues campaigning even from jail using an artificial intelligence voice clone.
Long one of Pakistan's best-known faces internationally, Imran Khan struggled for years to turn popular support into electoral gains.
In 1996, he launched Pakistan Tehreek-e-Insaf - which means Movement for Justice. But it was not until the 2011 general election that the PTI and its leader emerged as serious political contenders.
He was seen as a "change" candidate, whose promise to raise a whole new class of clean politicians chimed with voters disillusioned with the old political order. Seven years later a swing of epic proportions propelled him to power.
The PTI made huge gains in Punjab, its rivals' Nawaz and Shehbaz Sharif's bastion. The province holds more than half of the 272 directly-elected National Assembly seats.
Imran Khan spoke of his dream of building a "new Pakistan" where wealth was shared. He made ambitious promises that included reforming the country's tax system and bureaucracy.
"I pledge that, God willing, there will be a different kind of governance in Pakistan," he said then.
Instead, inflation soared, the rupee plummeted and Pakistan became crippled by debt, stoking anger and criticism that he had mishandled the economy.
He ended up negotiating a $6bn (£4.75bn) rescue bailout from the International Monetary Fund in 2019 to address a balance of payments crisis.
The former cricket captain had hoped to see out a full, five-year term, something no other prime minister had ever done in a country with a history of coups and military rule.
But by late March 2022, a series of defections had deprived him of his parliamentary majority and the opposition pounced, tabling a motion of no confidence.
Khan sought to circumvent the move by having parliament dissolved and calling a snap election, but the Supreme Court ruled this was in breach of the constitution. On 10 April the vote of no-confidence took place and Mr Khan lost, his opponents having secured 174 votes in the 342-member house.
He claimed there was a foreign conspiracy to bring about regime change because of his policies on Afghanistan, Russia and China, without providing evidence. He did not name any country - but was subsequently highly critical of the United States, which denied interference.
Khan's comments led to him being charged under Pakistan's official secrets act, in the so-called cipher case. He denied divulging the contents of a confidential diplomatic cable sent by Pakistan's ambassador in Washington to Islamabad when he was prime minister.
The charges could have led to life imprisonment or even the death penalty but, with a week to go before the 2024 election, he was jailed for 10 years.
Many observers say Imran Khan's biggest problem is that he has lost the support of the generals who have dominated Pakistan since its independence following the partition of British India in 1947.
Civilian leaders who have sought to tackle some of the country's root problems have found themselves on a collision course with the military establishment in the past - and Khan was no different. Shortly after his arrest, he singled out the army's chief of staff, Gen Asim Munir, as the man trying to crush the PTI.
He also found himself short of political friends. Far from cleaning up "dynastic politics", the PTI leader was accused of sidelining opponents, with many jailed on corruption charges during his tenure. His enemies united to remove him.
Late in 2022, he was shot and wounded in an attack during a protest rally in the eastern city of Wazirabad. He later claimed it had been an assassination attempt by senior officials, which the military strenuously denied.
Marriage to Jemima Goldsmith
Imran Khan was born in 1952, the son of a civil engineer. He and his four sisters had a privileged upbringing in Lahore where he was schooled, before he studied at Oxford University.
His talent for cricket emerged during these years. It led to an illustrious international career which spanned two decades, culminating in Pakistan's World Cup win in 1992.
In his youth, Khan also developed a reputation as a playboy on the London nightclub circuit, although he denies he ever drank alcohol.
After the 1992 World Cup, he retired from cricket and went on to raise millions of dollars to fund a cancer hospital in his mother's memory.
That foray into philanthropy spawned his career in politics.
In 1995, at the age of 43, he married the 21-year-old British heiress, Jemima Goldsmith - the daughter of one of the world's richest men at the time, Sir James Goldsmith. They had two sons before the marriage was dissolved in 2004.
A second marriage in 2015, to journalist Reham Khan, lasted less than a year. The former BBC weather presenter alleges she was bullied by his supporters and wrote a tell-all memoir.
Imran Khan married again in a low-profile ceremony in 2018. His third wife Bushra Watto, a mother of five, was described as his spiritual adviser, and observers say the match plays well with his public shows of devotion to Islam.
Ms Watto later set up a trust that allegedly received land as a bribe from one of Pakistan's top real estate developers. This was what led to the corruption charge that saw Khan arrested in 2023.
He had been so conscious of reforming his playboy image that during his 2018 campaign, he cancelled an interview with a female Pakistani journalist on his jet - apparently to avoid being seen with her when he disembarked.
As a politician, Imran Khan publicly upholds liberalism, but at the same time appeals to Islamic values and anti-West sentiment. On his watch, there was a significant rise in Islamist militancy in Pakistan, and religious extremists strengthened their position.
He has been criticised as sympathetic towards the Taliban, and branded "Taliban Khan" by opponents. In 2020 there was an outcry after he called Osama Bin Laden a martyr.
Pakistan - a long-time ally of the West, however reluctant in the "war on terror" - continued strengthening ties with China under his leadership. It abstained in the UN vote on Russia's invasion of Ukraine in early 2022.
Tense relations with neighbouring India, Pakistan's historic rival, did not improve during his tenure.
However, Khan can point to some successes.
Pakistan's Covid record was the best in South Asia, and a poverty-alleviation programme he launched made progress. His most notable achievement is probably the provision of universal healthcare in two provinces - Khyber Pakhtunkhwa and Punjab.
Khan's opponents seem committed to keep him out of the ballot on 8 February, but whether this spells an end to his political career remains unclear - some believe this may even strengthen sympathy for the embattled former PM who remains popular with many voters.