The dayslong political impasse in Malaysia over inconclusive election results ended Thursday after perennial opposition leader Anwar Ibrahim was sworn in as the country's new prime minister.
The ceremony at the palace closes the chapter on one of the most dramatic elections in Malaysia's history, after no party managed to secure a majority to form a parliament for the first time since independence in 1957.
Anwar's ascension to the premiership caps a turbulent political life, which has not only propelled him into the corridors of power but also landed him inside a jail cell.
"I, Anwar Ibrahim, after being appointed to hold the position of prime minister, solemnly swear that I will honestly fulfil that duty with all my efforts and that I will devote my true loyalty to Malaysia," the 75-year-old said while dressed in traditional Malaysian clothing.
In the capital Kuala Lumpur, Anwar's supporters were in a celebratory mood.
"I got goosebumps, seriously," said 36-year-old Norhafitzah Ashruff Hassan. "He fought hard to be given the chance to be PM. I hope he performs well and proves his worth."
Muhammad Taufiq Zamri, a 37-year-old product manager said: "I cannot express in words the ecstatic feeling I have."
Campaigning on an anti-graft message, Anwar's multi-ethnic Pakatan Harapan coalition won the most seats in the weekend's election with 82.
But it still fell short of the 112 required for a majority.
In an attempt to break the deadlock, the king had summoned Anwar and former prime minister Muhyiddin Yassin, whose Perikatan Nasional bloc came in second place with 73 seats. But no deal could be struck.
The king held a special meeting with other royals earlier Thursday before the palace announced Anwar as the new premier.
For Anwar, the premiership is the culmination of a 25-year rollercoaster ride.
The firebrand former student activist was close to power in the late 1990s, as finance chief and deputy prime minister to Mahathir Mohamad.
But the two had a bitter falling-out over how to handle the 1997-98 Asian financial crisis.
Mahathir sacked Anwar, who was also expelled from their then-party the United Malays National Organisation (UMNO), and charged with corruption and sodomy.
Anwar was sentenced to six years in jail for corruption in 1999, with an additional nine years added for the sodomy charge the following year, the two sentences to run consecutively.
As Anwar claimed political persecution, street protests erupted and evolved into a movement calling for democratic reforms.
The Mahathir-Anwar tussle has dominated and shaped Malaysian politics over the past four decades, "alternately bringing despair and hope, progress and regress to the country's polity," according to Oh Ei Sun of the Pacific Research Center of Malaysia.
The Malaysian Supreme Court overturned Anwar's sodomy conviction in 2004 and ordered him freed.
Anwar allied with Mahathir during the 2018 elections when his erstwhile tormentor came out of retirement to challenge incumbent Najib Razak, who was mired in the billion-dollar 1MDB financial scandal.
Their alliance scored a historic victory against UMNO and Najib, who is now serving a 12-year jail term for corruption.
Mahathir became prime minister for the second time, with an agreement to hand over the premiership to Anwar later.
He never fulfilled that pact, and their alliance collapsed after 22 months, leaving Anwar empty-handed again.
"This is a long time coming for Anwar Ibrahim," Asrul Hadi Abdullah Sani, deputy managing director at strategic advisory firm Bower Group Asia, told AFP.
"One of his agendas is to ensure he is able to fulfill his reform agenda as he looks to stabilize a loosely cobbled federal coalition."