Parti Pribumi Bersatu Malaysia (Bersatu) pro-tem president Muhyiddin Yassin today attended a court hearing involving PKR de facto leader Anwar Ibrahim at the High Court in Kuala Lumpur.

This comes after Bersatu adviser and Anwar's one-time arch nemesis Dr Mahathir Mohamad shook hands with Anwar while attending one of the jailed leader's court hearings last month.

Met by reporters after the court hearing, Muhyiddin said he was there to give Anwar moral support.

Anwar is serving a five-year jail sentence after he was last year found guilty of sodomy - a charge he maintains is untrue and politically-motivated.

Muhyiddin also spoke with Anwar at the witness holding room for about 30 minutes, but declined to reveal what was discussed.

He said it was important to build ties with Anwar, given that Bersatu aims to cooperate with Pakatan Harapan to topple BN in the 14th general election.

"We have not met for a while," Muhyiddin said.

Anwar and Muhyiddin had both held the deputy prime minister and Umno deputy president posts before they were ousted from the party.

"I think it is important for me, as Bersatu president, to build a relationship (with Anwar) so that a cooperation can be forged... and a strong alliance is formed to face BN in the upcoming general election," Muhyiddin said.

Former prime minister Mahathir's meeting with Anwar at the High Court on Sept 5 was to express his support for Anwar's bid to challenge the National Security Council Act.