KUALA LUMPUR - Jailed Malaysian reformist Anwar Ibrahim was granted a full pardon on Wednesday and walked free from a hospital in Kuala Lumpur, capping dramatic changes in the Southeast Asian country since the government was ousted in an election upset last week.
The question for Malaysia now is how Anwar will get along with Prime Minister Mahathir Mohamad, his ally-turned-foe-turned-ally, and what role he will play in government.
Anwar, 70, smiled and waved to supporters as he walked out of hospital, dressed in a black suit and tie and his hair neatly swept back. He was surrounded by his family, lawyers and prison guards before driving to the palace for an audience with King Sultan Muhammad V.
Supporters chanted "Reformasi" (Reform), the movement he launched two decades ago to challenge diverse Malaysia's race- and patronage-based politics.
Anwar has served three years of a five-year term for sodomy, a charge he says was trumped up by the government of ousted Prime Minister Najb Razak.
Mahathir, with whom Anwar joined forces to win last Wednesday's election, was at the palace to greet him.
"The king, with the advice of the pardons board of the federal territories of Kuala Lumpur, Labuan and Putrajaya, has allowed a full pardon and given an immediate release for ... Anwar bin Ibrahim," the palace said in a statement.
Anwar had been recovering from a shoulder injury in hospital under police guard. He was Mahathir's deputy in the 1990s but fell out with his mentor during the Asian financial crisis.
He was sacked from the ruling party and founded the Reformasi movement, challenging Mahathir's government. He was later arrested and jailed on charges of sodomy and corruption.
Images at the time of a goateed, bespectacled Anwar in court with a black eye and bruises brought condemnation of Mahathir from around the world.
Anwar's trial became a spectacle, with prosecutors at one stage bringing out what they said was a semen-stained mattress allegedly used when he had sex with two male aides.
After being freed, Anwar was jailed a second time for sodomy in 2015. Both times, he and his supporters have said the charges were politically motivated.
"Many have asked me how it is that our reform movement has now joined forces with the very same former dictator, Mahathir Mohamad, who sacked my father in 1998 and saw him arrested, brutalised and incarcerated," Anwar's daughter Nurul Izzah, wrote in an article for the Guardian newspaper on Tuesday.
"My answer is simply that we must all firmly resolve to never let our nation sink to the depths it did again and prime minister Mohamad now has a rare second chance to put things right." The pardon, granted on the grounds that there was a miscarriage of justice, allows Anwar to re-enter politics immediately.
'FIGHT NOT OVER'
Under a pre-election pact, Mahathir, 92, had vowed to enable Anwar's release and eventually step aside for him to become prime minister.
On Tuesday, Mahathir said he expected to be prime minister for one or two more years, setting off talk of differences between the two.
But Anwar's wife and deputy prime minister Wan Azizah Wan Ismail told reporters later that Anwar was in no hurry to become prime minister.
"Seeing him walk free makes me emotional, but the fight is not over," said Ridzuan Ismail, an Anwar supporter at the hospital. "Now we need to see him become prime minister." Jack Seng, another supporter wearing a shirt with an image of Anwar behind bars, said he thought Mahathir and Anwar would resolve any tension between them.
"I think we need to let Mahathir do his work to save Malaysia and to get back its system of government." Differences have already appeared between supporters of Mahathir and Anwar over cabinet positions and Anwar's role.
Mahathir is the leader of the ruling alliance and Anwar's People's Justice Party (PKR) won the majority of parliamentary seats in the group.
"The base case is that Mahathir passes the baton to Anwar. But Mahathir may be reluctant to hand over to his former nemesis, and if he drags his feet other scenarios could come into play," said Peter Mumford of the Eurasia Group in a research note.
Mahathir is also racing ahead with an investigation into graft at 1Malaysia Development Berhad ( 1MDB), a state fund founded by the ousted Najib that is sunk in a multi-billion-dollar graft scandal.
Mahathir has replaced the attorney-general and officials at the anti-graft agency, in what appears to be a purge of people seen as close to the former premier.
Najib and his wife, Rosmah Mansor, have been barred from leaving the country. Najib denies wrongdoing.
"It looks very likely that Najib will face the full force of the law," said Adib Zalkapli, a Kuala Lumpur-based analyst with risk consultancy Vriens & Partners.
"Just last week nobody would have thought that this posh boarding school boy would be rear ended by his old political headmaster," he said.