Malaysia's prime minister-in-waiting Anwar Ibrahim said Friday that it's time for him to return as a lawmaker, but reiterated his full support for the government led by his former foe-turned-ally Mahathir Mohamad.

Anwar and Mahathir put aside their 20-year-old political feud to help their alliance win a historic national vote in May that led to the first change of power since independence from Britain in 1957.

Anwar, who was convicted in 2015 for sodomy, couldn't take part in the elections but their four-party alliance had agreed that Mahathir would be prime minister and hand over the reins to Anwar. Anwar, 70, was freed and pardoned by the king shortly after the polls.

"The understanding ... is that immediately after the pardon, I should enter the race," Anwar told The Associated Press on Friday. "I waited four months and I think it is also important for me to start connecting" with lawmakers and focus on parliamentary reforms.

Mahathir "will continue leading the nation, I will give full support," he added.

A lawmaker from Anwar's party earlier this week announced he had resigned as a member of Parliament in the southern coastal town of Port Dickson to make way for Anwar's comeback. The Election Commission will set a date for a by-election that must be held within two months.

Anwar said he will work hard to appeal to the electorate and explain how new government policies will benefit Malaysians.

Mahathir, who is the world's oldest leader at 93, told AP in an interview last month that he expects to be in office for at least two years and will keep his promise to hand over power to Anwar.

Anwar was once a high-flyer in the former ruling coalition but was convicted of homosexual sodomy and corruption after a power struggle in 1998 with Mahathir, who was prime minister for 22 years until 2003. He was freed in 2004 and convicted again in 2015 of sodomy, which he said was concocted to destroy his political career.

Anwar worked from his prison cell to forge a new opposition alliance by making peace with Mahathir, a gamble that paid off.