Charismatic Malaysian politician Anwar Ibrahim won a by-election for a parliamentary seat with a landslide victory on Saturday in a grand political comeback to help him prepare for his eventual takeover from Prime Minister Mahathir Mohamad.

Anwar was designated as Mahathir’s successor after the two men set aside a bitter feud and joined hands to win a stunning victory in May’s general election.

Malaysia’s politician Anwar Ibrahim celebrates after winning the by election in the southern coastal town in Port Dickson, Malaysia. Saturday, Oct. 13, 2018. Malaysian politician Anwar Ibrahim won a parliamentary seat and returns to active politics as he prepare for his eventual takeover from Prime Minister Mahathir Mohamad. (AP Photo/Vincent Thian)

Anwar couldn’t participate in the election due to a sodomy conviction — a charge that he alleged was politically motivated — but he was freed and received a royal pardon days after the polls.

The Election Commission said Anwar received 31,016 votes for the parliamentary seat in the southern coastal town of Port Dickson, defeating six other candidates. His closest rival secured only 7,456 votes.

Malaysia’s politician Anwar Ibrahim, right, waves as he celebrates after winning the by election in the southern coastal town in Port Dickson, Malaysia. Saturday, Oct. 13, 2018. Malaysian politician Anwar Ibrahim won a parliamentary seat and returns to active politics as he prepare for his eventual takeover from Prime Minister Mahathir Mohamad. (AP Photo/Vincent Thian)

He will be sworn in as a lawmaker in parliament on Monday.

Anwar was once a high-flying member of the former ruling coalition but was convicted of homosexual sodomy and corruption after a power struggle with Mahathir, who was prime minister for 22 years until 2003.

Malaysia’s politician Anwar Ibrahim, second left, and his wife and Deputy Prime Minister Malaysia Wan Azizah Ismail, celebrate after winning the by-election in the southern coastal town in Port Dickson, Malaysia. Saturday, Oct. 13, 2018. Malaysian politician Anwar Ibrahim won a parliamentary seat and returns to active politics as he prepare for his eventual takeover from Prime Minister Mahathir Mohamad. (AP Photo/Vincent Thian)

Anwar was freed in 2004 but was once again convicted for sodomy in 2015, charges he said were concocted to destroy his political career.

Malaysia’s politician Anwar Ibrahim, right, sit next to his wife and Deputy Prime Minister Malaysia Wan Azizah Ismail as they waiting for result of the by election in the southern coastal town in Port Dickson, Malaysia. Saturday, Oct. 13, 2018. Malaysian politician Anwar Ibrahim won a parliamentary seat and returns to active politics as he prepare for his eventual takeover from Prime Minister Mahathir Mohamad. (AP Photo/Vincent Thian)

Angered by a massive corruption scandal at a state investment fund, Mahathir made a political comeback and the two men forged an alliance that paid off in the May 9 national election.

Mahathir, the world’s oldest leader at 93, has said he expects to be in office for at least two years and will keep his promise to hand over power to Anwar.

Malaysia’s politician Anwar Ibrahim, right, hug his wife while Deputy Prime Minister Malaysia Wan Azizah Ismail celebrates after winning the by election in the southern coastal town in Port Dickson, Saturday, Oct. 13, 2018. Malaysian politician Anwar Ibrahim won a parliamentary seat and returns to active politics as he prepare for his eventual takeover from Prime Minister Mahathir Mohamad. (AP Photo/Vincent Thian)

Anwar has said he wants to focus on parliamentary reforms and will not interfere in Mahathir’s governance.

“Attention should focus on what he would do in parliament and his relationship with those in government,” said Bridget Welsh, a political science lecturer and Southeast Asia expert at John Cabot University in Rome.

Source: The Associated Press