KUALA LUMPUR (Reuters) - Malaysia’s opposition coalition on Sunday named 92-year old former premier Mahathir Mohamad as its prime ministerial candidate for a general election that must be called by August.

Slideshow ( 2 images )

With the country’s most popular opposition leader Anwar Ibrahim in jail, Mahathir is seen as the biggest threat for Prime Minister Najib Razak, who is engulfed in a corruption scandal.

Mahathir, who earned a reputation during his 22-year tenure as prime minister of being a no-nonsense authoritarian with little time for dissenters promoting liberal values, stands to become the world’s oldest leader if the opposition wins.

A victory could also potentially pave the way for former Mahathir foe Anwar to become the prime minister.

Mahathir and Anwar’s wife Wan Azizah Wan Ismail will be the Pakatan Harapan coalition’s candidates for the premier and deputy prime ministerial posts respectively, secretary general Saifuddin Abdullah said at the alliance’s convention.

If the opposition wins, the component parties have agreed to immediately commence the legal processes to obtain a royal pardon for Anwar, Saifuddin said.

“...So that Anwar could immediately play a role in the federal government and subsequently be proposed as a candidate for the eighth prime minister,” he said.

The Mahathir-Anwar coalition and their endorsement of each other is a turnaround from their bitter feud that has shaped Malaysia’s political landscape for nearly two decades.

Anwar was once a protege of Mahathir, and the rising star of Malaysian politics, but they had a falling-out in the late 1990s. Soon afterwards, Anwar was jailed on charges of sodomy and graft, after being sacked as the deputy prime minister. He denied the charges, dismissing them as politically motivated.

Anwar later led an opposition alliance to stunning electoral gains in 2013. Najib’s Barisan Nasional coalition lost the popular vote in that election, but managed to stay in power after winning a majority of the seats in parliament.

Anwar was again convicted in 2014 for sodomy, a charge he says was an attempt to end his career, and jailed a year later after failing to overturn the verdict.

The sodomy conviction disqualifies Anwar from political office and from contesting the next election. A royal pardon, however, would let him contest.

Opposition to Prime Minister Najib has brought Anwar and Mahathir back together, with their parties now working in the opposition coalition.

Najib has been embroiled in a corruption scandal involving state fund 1Malaysia Development Berhad (1MDB). In civil lawsuits, the U.S. Justice Department has alleged that about $4.5 billion was misappropriated from 1MDB.

The fund has denied any wrongdoing and Najib, who founded 1MDB, has denied all allegations of corruption against him and was cleared of wrongdoing by Malaysia’s attorney-general.

(This version of the story corrects year of Anwar Ibrahim’s conviction in paragraph 11.)