An election-eve opinion poll suggested that the ruling coalition's support was slipping and that Mahathir's Pakatan Harapan (Alliance of Hope) would land more votes in peninsular Malaysia, home to 80 percent of the population.
Mahathir headed the BN and was the prime minister of Malaysia from 1981 to 2003.
Najib's coalition has been in power since the country gained independence in 1957. Anwar, who has been serving another jail term since 2015, urged Malaysians to vote for Mahathir. Remarkably robust for 92, he pledged that the new government would not seek "revenge" against political opponents.
"We do not want to make any allegations but there is a possibility of EC intentionally delaying voters because the EC was involved in stopping voters from voting, and from the beginning, EC changed and amended the voters' lists, conducted the redelineation, and attempted to ban the Opposition parties".
A win for the opposition would amount to a political natural disaster in Malaysia, which has been governed by the same ruling coalition for decades.
"This is a repudiation of Najib's government from all walks of life from the very rural northern states to the more industrial southern coast", said Bridget Welsh, a Southeast Asia expert at John Cabot University in Rome. But there's a deliberate attempt to delay by not signing the form.
Early results showed that BN had lost seats in key states that have traditionally been its strongholds, underlining public disenchantment with the government over the cost of living and a multi-billion-dollar scandal that has dogged Najib since 2015.
In a tweet, Najib condemned the "tactic of spam calls" from global numbers received by his camp's leaders and said web sites of the BN alliance could not be accessed.
"We can not be confident that [the opposition] will look after our interests, especially the people in the rural areas, the interests of Islam and the interests of the Malays", he told a rally in Pahang state at the weekend, state news agency Bernama reported. In an unlikely reconciliation, he has joined hands with Mahathir, who sacked him as his deputy in 1998. He has been a significant game changer.
Oil Stocks: Iran Sanctions Could Add to Global Supply Shortage
Saudi Arabian energy minister Khalid al-Falih said he was concerned about possible shortages of spare crude production capacity. Saudi Arabia is the OPEC member that wants higher prices as it prepares for the listing of state oil giant Aramco.
TRT World's Natalie Poyhonen has more from Kuala Lumpur.
In the small town of Kuala Pilah, Malay businessman Abdul Moktar Awalluddin said he had dropped his life-long support for Najib's United Malays National Organization (UMNO), the main party in the ruling coalition.
Faced with a reinvigorated opposition, the government used all the levers of power to further tilt the playing field in its favor, critics and analysts said.
Critics have accused the BN of gerrymandering with a redrawing of electoral boundaries that created constituencies more likely to back them, while activists have alleged numerous irregularities in the electoral roll. Rights groups said a recently passed law against "fake news" was meant to stifle criticism and debate.
Najib has not publicly reacted to the election result. "Because of that, the official announcement can't be made", he told a packed press conference at the Sheraton Hotel in Petaling Jaya.
"We have lost contact with all of our polling agents", said Lim Guan Eng, a senior leader of the opposition Democratic Action Party.
There are 222 seats in parliament, and 112 are needed for victory at the election with a simple majority.
Mahathir's victory was surreal for his family.
According to reports throughout the day, some voters learnt that some other people had voted in their name, their ballot papers failed to have the EC stamp on them, and some were turned away over their dressing.