Anwar Ibrahim: Malaysia's leader-in-waiting
Anwar Ibrahim is a reformist Malaysian politician who helped the current prime minister to a shock election victory and looks set soon to take over the top post himself.
The controversial figure had been jailed on widely criticised charges of sodomy and corruption after a bitter feud with the government.
But in May 2018 the 70-year-old received a full pardon, initiated by the new prime minister under whom he was first sent to prison - Mahathir Mohamad.
It is a move which would have been unimaginable just a few years ago and one of many surprising twists in Mr Anwar's long and hard-fought political career.
- Malaysia's Anwar Ibrahim freed from jail
- Mahathir Mohamad: A political survivor
- Corruption, money and Malaysia's election
- What just happened in Malaysia?
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.
The prime minister 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."