Anwar Ibrahim speaks next to his wife Wan Azizah, president of Justice Party, during a press conference at their house in Kuala Lumpur, Malaysia, May 16, 2018.
Anwar Ibrahim speaks next to his wife Wan Azizah, president of Justice Party, during a press conference at their house in Kuala Lumpur, Malaysia, May 16, 2018.

Malaysian reformist politician Anwar Ibrahim is welcoming "a new dawn" for his country.

Anwar's three-year imprisonment ended Wednesday after he was granted a royal pardon. The 70-year-old politician was greeted by hundreds of supporters as he walked out of a hospital in Kuala Lumpur where he was receiving treatment for a shoulder injury, and headed for a meeting with King Sultan Muhammad V.

Anwar's release and pardon follows his Alliance of Hope party scoring an upset victory in last week's parliamentary elections, ousting scandal-tainted Prime Minister Najib Razak and his Barisan Nasional coalition, which ruled Malaysia uninterrupted for more than six decades.

Malaysia's outgoing Prime Minister Najib Razak wal
Malaysia's outgoing Prime Minister Najib Razak walks to a news conference to concede the general election in Kuala Lumpur, Malaysia, May 10, 2018.

Anwar praised Malaysians for his party's victory, saying "regardless of race or religion, have stood by the principles of democracy and freedom."

The party's victory was paved by a reconciliation between Anwar and 92-year-old Mahathir Mohamad, who ruled Malaysia with an iron fist from 1981 to 2003, and came out of retirement to lead the Alliance of Hope to victory. Anwar served as deputy prime minister and finance minister under Mahathir, and was seen as Mahathir's heir-apparent until he was fired in 1999. The fallout led to Anwar's conviction and six-year imprisonment on a charge of sodomy.

FILE - Malaysian Prime Minister Mahathir Mohamad,
FILE - Malaysian Prime Minister Mahathir Mohamad waves to crowds leaving National Mosque after performing Friday prayers in Kuala Lumpur, Malaysia, May 11, 2018.

Anwar says he has forgiven Mahathir, but has no plans to join the older man's Cabinet. Mahathir, the world's oldest elected leader, says he will run the government for two years before turning over the reins to Anwar, who must first be re-elected to parliament.

Anwar's wife, Wan Azizah Wan Ismail, serves as deputy prime minister.