Pakatan Harapan has formally announced its chairperson Dr Mahathir Mohamad as its prime ministerial candidate with Dr Wan Azizah Wan Ismail as deputy premier for the upcoming general elections.

This was read out by Harapan chief secretary Saifuddin Abdullah towards the end of the Harapan convention at Shah Alam today.

"In acknowledging Harapan as a grand coalition, the parties with the cooperation of two statesmen, Mahathir and Anwar Ibrahim will complete the mission.

"We announce Mahathir as the PM candidate and Wan Azizah as the DPM candidate," he said, reading out a Jan 6 agreement signed by Harapan's top guns.

Once Harapan takes power, the new government will work for the release of Anwar, which is set for June 8.

Harapan had previously agreed that Anwar would be the next prime minister.

However, Anwar appeared to have consented to the new arrangement in a message read out by PKR vice-president Nurul Izzah Anwar.

While the message did not go into detail, it said PKR will abide by Harapan's decision.

The announcement today comes after weeks of wrangling as Bersatu, DAP and Amanah were prepared to endorse Mahathir as Harapan's prime ministerial candidate but PKR had its reservations.

PKR, or more specifically Parti Keadilan Nasional before its merger with Parti Rakyat Malaysia, was born out of an uprising against Mahathir when he was prime minister.

This was after Mahathir sacked Anwar as his then deputy prime minister in 1998.

That historical backdrop had made it difficult for PKR to accept Mahathir, however, the party eventually relented after it secured the wording it wanted about Anwar's release.

In the joint statement, it said Harapan, should it form the new federal government, will immediately seek a royal pardon for Anwar.

Anwar will be released from prison on June 8 but faces a five-year ban from politics due to his conviction.

He was found guilty of sodomy in 2014, a charge he claimed to be politically motivated.

The joint statement also outlined Harapan's general pledges for the 14th general election.

One of this is to limit the prime minister's tenure to two terms if Harapan comes to power.

The coalition will also require all top positions in the country such as the attorney-general, inspector-general of police, armed forces chief, MACC chief, Election Commission chief and auditor-general to undergo a parliamentary confirmation hearing before they are appointed by the Yang Di-Pertuan Agong.

This is on top of its often touted institutional, economic and social reforms as well as promises to abolish the Goods and Services Tax, stabilise fuel prices and uphold the Malaysia Agreement 1963.