Anwar Ibrahim has emerged as the winner in a district by-election, clearing the way for the formerly jailed leader to become the nation's eighth prime minister.

Anwar, 71, leader of the largest party in the ruling coalition, is set to be inaugurated on Monday after winning 71 percent of votes against six other candidates for a Parliament seat, the Election Commission announced Saturday. Polling at the coastal town of Port Dickson ended at 5 p.m. local time with voter turnout at 58 percent.

"The results exceeded our expectations because we obtained a convincing majority," Anwar said after being declared the victor. "We were able to convincingly win the support of all races," he said, referring to the constituency's ethnic split of Malays, Chinese and Indians. While he's set to replace Mahathir Mohamad as prime minister in a year or two, he has tempered expectations of taking an immediate role in the cabinet. He would first focus on developing his constituency as a tourism destination while working on reforms in the legislative body, giving Mahathir space to run the government. Mahathir has vouched for this, and appeared by Anwar's side at a rally Monday.