Continued from page 1

An opposition win would have represented a remarkable comeback for Mr. Anwar, a former deputy prime minister who was fired in 1998 and subsequently jailed on corruption and sodomy charges that he says were fabricated by his political enemies. He was released from jail in 2004.

Mr. Anwar and other opposition leaders voiced suspicions Sunday about electoral fraud. Claims of bogus ballots and an apparent ease in which some voters cleaned the ink stains off their fingers dominated social media.

Opposition leaders said the National Front used foreign migrants from Bangladesh, the Philippines and Indonesia to vote unlawfully. Government and electoral authorities denied the allegations, saying private donors had paid for legitimate voters to fly home.

The opposition stayed in control of northern Penang state, one of Malaysia‘s wealthiest territories, and remained strong in Kuala Lumpur, where middle-class voters have clamored for national change.

The National Front held firm in many traditional rural strongholds, especially in Borneo, where Mr. Anwar’s alliance had been hoping to make major inroads to bolster its chances of victory.

The National Front’s aura of invincibility has been under threat since three of Malaysia‘s main opposition parties combined forces five years ago. In recent years, the National Front increasingly has been accused of complacency and heavy-handed rule.

Mr. Najib, who took office in 2009, embarked on a major campaign to restore his coalition’s luster. In recent months, authorities have provided cash handouts to low-income families and used government-linked newspapers and TV stations to criticize the opposition’s ability to rule.