Former deputy prime minister arrives at the royal palace to meet with king after being released from prison.

Malaysia’s former Deputy Prime Minister Anwar Ibrahim has been released from prison after receiving a full pardon from the king on Wednesday.

Speaking at a news conference after being freed following the royal pardon, he thanked the Malaysian people for standing by “the principles of democracy and freedom”.

“Now there is a new dawn for Malaysia. I must thank the people of Malaysia. Malays, Chinese, Indians, Kadazans, Iban; the entire spectrum of our Malaysians, regardless of race and religion …

“They demand change and it is our duty now to ensure that this mandate given to Pakatan Harapan [political alliance] will honour this commitment,” the politician added.

Anwar, who was initially scheduled to be released on Tuesday, walked out of the Cheras Rehabilitation Hospital, where he was temporarily confined after a surgery, and later arrived at the residence of the king, Yang di-Pertuan Agong Sultan Muhammad V.

{articleGUID}

An image published by the Malaysian news agency Bernama showed Anwar, 70, greeting newly elected Prime Minister Mahathir Mohamad, his ally-turned-foe-turned-ally.

Another image showed the king welcoming Anwar and his wife, Wan Azizah Wan Ismail, the deputy prime minister-designate.

Earlier, Mahathir arrived at the royal palace for the royal pardons board meeting to discuss Anwar’s release.

The question for Malaysia now is how Anwar will get along with Mahathir and what role he will play in the new government.

Anwar’s party, PKR, holds 48 seats of the 113 seats won by the Pakatan Harapan alliance on Wednesday, and he is widely tipped to succeed Mahathir once he steps down from office.

Ketua Umum PKR @anwaribrahim kini berada di Istana Negara pic.twitter.com/6XDFSwN973 — BERNAMA (@bernamadotcom) May 16, 2018

In 2015, Anwar was jailed for five years after being accused of sodomy, a charge he described as a politically motivated attempt by then Prime Minister Najib Razak to end his career.

Sodomy is illegal in Muslim-majority Malaysia, where the offence carries a jail term of up to 20 years.

Under Malaysian law, unless he is pardoned by the king, Anwar would be disqualified for five years from running for office after his release.

Anwar was also imprisoned for six years after being overthrown as Mahathir’s deputy prime minister in 1998 on earlier charges of sodomising his former family driver and abusing his power.

He was freed in 2004 after Malaysia’s top court quashed that sodomy conviction.

Anwar previously had a falling out with Mahathir after he criticised some of his policies.

But his party eventually formed an alliance with Mahathir to take on Najib’s United Malays National Organisation (UMNO) for the election on Wednesday.

In recent weeks, Mahathir acknowledged the suffering of Anwar and his family.

“I know how Anwar feels. It was during my administration that he was sent to [prison]. It is not easy for him to accept me and shake my hand,” The Malaysia Insight quoted Mahathir as saying.

“And it’s not just Anwar but his family as well who felt pressure when he was jailed. They suffered for 20 years.”

Anwar’s pardon paves the way for his political comeback, following his alliance’s stunning election victory.

The reformist icon added it was the duty of his political party Pakatan Harapan to honour its commitment to the people and deliver their demands.

“The most significant lesson one can learn from prison life is the value of freedom. When you are incarcerated you realise what is the meaning and significance of freedom.

“No one, not Anwar, or … anyone must be allowed to undergo the same travesty that has befallen any individual. I happened to be known, I happened to be supported by many people. But we must stop this once and for all, and it is our duty, and our duty particularly in Pakatan Harapan to end this.”