The man widely expected to be governing Malaysia in roughly two years' time walked out of a Kuala Lumpur hospital and to freedom on Wednesday.
Opposition icon Anwar Ibrahim, who heads the People's Justice Party (PKR), is considered a hero in Malaysia, where he has been jailed twice. He received a full pardon on Wednesday in a milestone development that's been dubbed — rightly or wrongly — Malaysia's "Nelson Mandela moment."
The former political prisoner was in the hospital recovering from shoulder surgery.
In a plot twist typical of espionage thrillers, the individual responsible for Anwar's freedom is the same man who imprisoned him in 1998: newly-minted Prime Minister Mahathir Mohamad. The 92-year-old stunned observers of last week's general election, defeating incumbent Najib Razak and the Barisan National party that's ruled Malaysia since independence.
Mahathir, who first ruled the nation from 1981 to 2003, was once the face of Barisan National, with Najib as his protege. But following allegations of Najib's role in a multi-billion-dollar graft scandal, Mahathir has since joined the opposition and worked with Anwar's PKR faction to form a four-party coalition known as Pakatan Harapan. PKR is the largest entity within the coalition.
That alliance of once bitter rivals was cemented by Mahathir's campaign promise to release Anwar and eventually pass him the premiership.
Alongside Najib, 70-year-old Anwar was also one of Mahathir's proteges. From 1993, he served as Mahathir's deputy prime minister under the Barisan National coalition but was sacked and jailed in 1998 on charges that his supporters dismissed as false.
Anwar "enjoys deep and warm ties in Washington, where he has received support during his travails over the past two decades," analysts at the Center for Strategic and International Studies said in a recent note.
But Anwar still has to work to do before he can take over the premiership.
He first needs to become a member of parliament, which requires that a seat be vacated. Speculation is that his wife Wan Azizah Wan Ismail, currently deputy prime minister, will give up her seat so a by-election can be held. Anwar, who enjoys immense popularity at home, is likely to win under that scenario.
Mahathir's swift and largely unexpected election victory has raised some skepticism as to whether he will hand the baton to a former foe such as Anwar.
"Dr. Mahathir in the past has been pretty ruthless — you really couldn't make up a story that he and Anwar Ibrahim would be together again," said Gerald Ambrose, chief executive officer at Aberdeen Islamic Asset Management.
The PM, who recently faced a few health issues, said on Tuesday that he may rule for one to two years.
Stepping aside for a ex-rival "would be a very un-Mahathir like move ... but then again, Anwar's party is the largest in the coalition, so Mahathir needs Anwar's continued support," said Malcom Cook, senior fellow at the ISEAS-Yusof Ishak Institute, a Singapore-based think tank.
Despite a "long and rather tortured history together, it's back to the future" for the unlikely pair, Cook said.
Wong Chen, a member of Malaysia's parliament for the constituency of Subang, emphasized that the ruling coalition was formed on the basis of Mahathir governing solely for an interim period.
Wednesday "is going to be our happy Mandela moment," Wong said. It will mark the day "that Malaysia sees the future prime minister after Dr. Mahathir hands over in two years time."
—CNBC's Sri Jegarajah contributed to this report.