Jailed Malaysian reformist Anwar Ibrahim has been granted a full pardon and freed from custody, 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 the new government.
Anwar, 70, said he would like to take time off with his family and did not intend to join the cabinet any time soon. He said he would support the government led by Mahathir and Deputy Prime Minister Wan Azizah Wan Ismail, who is Anwar's wife.
"I've told Tun Mahathir, I don't need to serve in the cabinet for now," Anwar said, using an honorific for the prime minister.
Anwar has been in hospital for months, for surgery on a shoulder.
He was sentenced in 2015 to a five-year term for sodomy, a charge he says was trumped up by the government of ousted Prime Minister Najib Razak.
Mahathir, with whom Anwar joined forces to win last Wednesday's election, greeted him at the palace where they both met the king.
Anwar 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. Within weeks, he was 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 in 2004, Anwar was jailed a second time. Both times, he and his supporters have said the charges were politically motivated.
Anwar later told a news conference at his home he had forgiven the veteran leader, who was a pugnacious, uncompromising prime minister for 22 years from 1981.
"I and Mahathir have buried the hatchet already, it was a long time ago," Anwar said.
The pardon, which enables Anwar to re-enter politics immediately, was granted on the grounds that there had been a miscarriage of justice.
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 fresh differences between the two.
Mahathir is racing ahead with an investigation into graft at 1Malaysia Development Berhad (1MDB), a state fund founded by the ousted premier 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.