Anwar Ibrahim: The Malaysian leader that never was
He once seemed set to claim the job of Malaysian prime minister, but Anwar Ibrahim's chances now look slim after a sudden twist of events saw him removed from the country's ruling coalition.
Mr Anwar has had a long and hard-fought political career. He was previously jailed on widely criticised charges of sodomy and corruption after a bitter feud with the government.
But in 2018, he received a full pardon, initiated by the then prime minister under whom he was first sent to prison - Mahathir Mohamad.
In an unexpected move, the duo joined forces to oust the previous ruling government, and came into power under a new alliance - Pakatan Harapan.
Mr Mahathir promised to hand over to power to Mr Anwar, but failed to give a specific date.
In February this year, the Pakatan Harapan coalition fell apart, in part due to internal rivalries. Mr Mahathir resigned and was replaced by Muhyiddin Yassin - the country's former interior minister.
Mr Muhyiddin's rise will only mean Mr Anwar's chances of becoming prime minister are growing slimmer by the day.
Mr Anwar first made his name as a student leader of an Islamic youth organisation, founding Malaysia's Islamic youth movement, ABIM.
He surprised many by joining Malaysia's dominant party, United Malays National Organisation (UMNO), in 1982 but it proved to be a canny political move - he enjoyed a quick ascent up the political ladder and held multiple ministerial posts.
In 1993 he became Mr Mahathir's deputy and was widely expected to succeed him, but tensions grew between the two men, particularly over issues like corruption and the economy.
In September 1998, Mr Anwar was sacked and led public protests against Mr Mahathir. He was arrested and eventually charged with sodomy and corruption.
The trial which followed led to a six-year jail term for corruption and sparked further huge street protests.
In 2000 he was found guilty of sodomy with his wife's driver and jailed for a further nine years, to be served concurrently with his other sentence.
While homosexual acts are illegal in Malaysia, very few people are ever prosecuted. Mr Anwar has always maintained the charges were part of a political smear campaign to stop him being a political threat to Mr Mahathir.
In late 2004 Malaysia's Supreme Court overturned the sodomy conviction, freeing him from jail.
Upon his release, he emerged as the de facto head of a newly invigorated opposition that registered a strong showing in the 2008 elections.
The opposition gained more than a third of parliamentary seats and control of five states, partly due to public discontent over corruption and discrimination issues.
But claims of sodomy were again made against Mr Anwar in 2008, in what he said was another attempt by the government to sideline him.
A High Court eventually cleared Mr Anwar of the charges in January 2012, citing a lack of evidence.
In the 2013 general election, Mr Anwar led the opposition into what was seen as the most hotly contested election to date.
The three-party opposition comprised Mr Anwar's multi-racial party, a secular Chinese-majority party and a conservative party of Muslim Malays.
They didn't win, but the ballot delivered the worst ever showing for the ruling Barisan Nasional coalition.
Back to jail
But his political comeback was short-lived. Mr Anwar's 2004 acquittal was itself overturned a year later - as he was preparing to fight a state election he seemed likely to win - and he was sent back to jail.
In a shock turn of events earlier this year, his former nemesis Mr Mahathir announced he was going to run for top office again. He said he was sick of the corruption allegations plaguing the incumbent, his former protégé Najib Razak.
And rather bizarrely, that paved the way for Mr Anwar's return to public life.
He has remained popular with opposition supporters and Mr Mahathir won the 2018 election - as head of the Pakatan Harapan - partly on his pledge to free him from prison.
Mr Mahathir had also indicated he would hand power to Mr Anwar within two years.
On his first day in office, Mr Mahathir said the king, who has the power to pardon Mr Anwar, had agreed to do so "immediately" and on 16 May the politician received his pardon.
"Now there is a new dawn for Malaysia. I must thank the people of Malaysia," Mr Anwar told a news conference on his release.
"The entire spectrum of Malaysians, regardless of race or religion, have stood by the principles of democracy and freedom. They demand change."
Mr Anwar, together with Mr Mahathir and several other parties, formed the Pakatan Harapan coalition, which ruled the country for two years before it collapsed.
But Mr Mahathir threw the country's politics into turmoil in late February 2020 when he resigned, breaking his alliance with Mr Anwar.
After his resignation, he and Mr Anwar later announced that they had, in fact, reunited again and commanded majority support.
But the king, Sultan Abdullah Sultan Ahmad Shah, who had ultimate say on who should form a government, chose Mr Muhyiddin.
A former interior minister, Mr Muhyiddin once controversially described himself as "Malay first" - and Malaysian second.