"The entire spectrum of Malaysians, regardless of race or religion, have stood by the principles of democracy and freedom. They demand change."
Anwar was jailed for sodomy four years ago. A royal pardons board met at 11am to clear his release.
Smiling and looking spry in a tailored black suit, Anwar emerged from a Kuala Lumpur hospital where he had undergone surgery for a shoulder problem, giving a thumbs-up to a crowd of journalists before leaving in a convoy of cars without making any public comment.
Devamacar Arumugam, 45, a woman wearing a sari made up of Anwar’s People’s Justice Party (PKR) flags, said she waited all day on Tuesday and was back just after dawn on Wednesday to see him free.
“Today, I am very happy,” she said.
Anwar was freed in 2004 but jailed again in 2015 – for five years – for sodomising a former aide. He and his supporters described the charge as a politically motivated attempt by Najib Razak to end his career.
Anwar set to be PM in two years
Anwar joined forces with his old ally-turned-foe-turned ally, 92-year-old Mahathir Mohamad, to oust scandal-tainted former premier Najib Razak.
Mahathir, who is now prime minister for a second stint, had vowed to enable Anwar’s release and eventually step aside for him to become the prime minister.
In "an initial stage, maybe lasting one or two years, I will be the prime minister," Mahathir said, speaking by live video link from Kuala Lumpur to a Wall Street Journal CEO conference in Tokyo on Tuesday.
"I will play a role in the background even when I step down."
Bishop: 'Anwar has much to contribute'
Foreign Minister Julie Bishop said the Australian government had followed Anwar's trial closely and had expressed concerns to the previous Malaysian government.
She is relieved the pardon will allow Anwar to participate fully in Malaysian politics.
"Anwar has much to contribute to Malaysia," she said.
Supporters welcome Anwar's release
“I am disappointed because I had hoped he could be prime minister as soon as possible,” said Talib Ibrahim, an Anwar supporter outside the hospital.
Wearing a white shirt printed with a photograph of Anwar and the words “March 2 Freedom”, he said he nevertheless believed Anwar and Mahathir could work together and that the alliance’s prospects were good.
Anwar's freedom is expected to ease fears of a growing rift within the newly formed coalition government after differences erupted between supporters of Mahathir and Anwar over cabinet positions and Anwar’s role in the party.
Anwar has been recovering from a shoulder injury in the hospital under police guard.
PKR party leader Mohamed Azmin Ali told reporters outside the hospital that Anwar and his wife Wan Azizah Wan Ismail are heading straight to the palace for an audience with the king, Sultan Muhammad V.
Re-entry to politics
The path to prime ministership will require Anwar to win a seat in a parliament. It is a step that can be immediately pursued, rather than waiting the five years stipulated in the country's constitution, due to a royal pardon from Malaysia's king.
Mahathir said after winning a parliamentary seat, Anwar could potentially be appointed to the Cabinet.
He said no final decision had been made on a Cabinet position.
"I expect him to play the same role as the leaders of the other three parties. There will be no special powers given except as are given to ministers or deputy ministers or deputy prime ministers," Mahathir said.
Mahathir is the leader of the ruling alliance and Anwar’s PKR won the majority of parliamentary seats in the group.
The volatile relationship between Mahathir and Anwar has dominated Malaysia’s political landscape for over three decades and is central to the future of the alliance.
Anwar promises a 'golden era'
Speaking ahead of his release, Anwar said he was optimistic about the country's future.
"I always believed in the wisdom of the people and that if we fought hard enough we would eventually prevail," he told Fairfax Media in an interview, adding that a new "golden era" was afoot.
"At a time when democracy is in retreat around the world, I hope that the people of Malaysia have given some hope to people around the world clamouring for their own freedom."
- Additional reporting by AFP.