The party of Malaysia's scandal-tainted Prime Minister Najib Razak has won two parliamentary by-elections in a landslide, further strengthening his rule despite corruption allegations.

Najib's party was expected to win due to a fractured opposition, as well as his ruling coalition's well-oiled machinery and money. Voters in the two rural constituencies are also mostly ethnic Malays, the bedrock of support for his Malay party.

Najib says his party won with much bigger majorities, showing that the people rejected "politically-motivated slander" against his government.

Last month, Najib also secured a major win for his ruling coalition in a state election.

The victories strengthen his hold on power amid accusations of corruption over allegations that hundreds of millions of dollars had been channeled into his accounts from an indebted state fund.