PKR de facto leader Anwar Ibrahim was "extremely happy" to witness Dr Mahathir Mohamad being appointed as prime minister again last night, said Selangor Menteri Besar Mohamed Azmin Ali.

Anwar, who is technically still incarcerated, had witnessed the ceremony on television last night while at the Cheras rehabilitation hospital. Azmin was by Anwar's side at the time.

"He was extremely happy to see Mahathir being sworn in as prime minister and he believed Mahathir's leadership will be able to garner more support for Harapan," Azmin told reporters at the Istana Alam Shah, Klang today.

Earlier, he was sworn in as the Selangor menteri besar. This is the first time Azmin had won his own mandate.

Azmin added that Anwar was overjoyed by the public's support for Harapan at the polls, which led to a change in federal government for the first time in history.

"For sure he was overjoyed by the public's support for Harapan in GE14.

"It is one of the things which had brought him great joy after being imprisoned for so long," said Azmin.

Mahathir was sworn in as Malaysia's seventh prime minister last night.

In his maiden press conference, Mahathir stressed that Harapan would work towards securing Anwar's release by means of obtaining a royal pardon.