"As of now we have obtained a simple majority," Badawi said after the election commission announced the results just after midnight on Saturday.
"We suffered a lot of losses tonight. But we are going to fight on," one newspaper quoted him as saying. "We are not going to quit."
The March 8 vote saw opposition parties Keadilan, the Democratic Action Party and PAS making significant inroads in BN strongholds, winning 82 parliamentary seats.
Keadilan won 31 seats to lead the opposition presence in the country's new parliament. The Democratic Action Party took 28 seats and PAS won 23.
The opposition had a total of just 19 seats in the outgoing parliament.
"It's a people's revolution," Husam Musa, vice-president of the PAS, said.
"People are waking up and sending a clear message to the government that enough is enough."
Allegations of vote-rigging, gerrymandering and phantom voters – impersonators of fraudulently registered and genuine voters – have for years haunted Malaysia's general elections.
Al Jazeera's Hamish Macdonald said that the BN's slim majority has brought the issue of voting irregularities into focus in a system that allegedly favours the incumbent.
In Cempakah, Al Jazeera found one street where more than 560 people were registered to vote, 26 of them in one house.
"Actually only my brother is staying in this house, but we found there are 26 people voting at this address ... it's impossible it's only 1,400 square feet," Jenice Lee, a candidate for the opposition DAP party, said
In an unprecedented election defeat, the BN lost control in four key states – Penang, Perak, Kedah and Selangor.
Gerakan, one of the 14 component parties in the BN coalition, lost Penang after 39 years.
Koh Tsu Koon, Penang's chief minister, in conceding loss said he felt "sad and surprised".
|"The people have voted decisively for a new era |
where the government must be truly inclusive and recognise that all Malaysians ... are a nation of one"
Malaysia's former deputy prime minister
"I urge all BN members to stay calm and not to take any action that could jeopardise peace and security in the state."
The ruling coalition also failed to recapture Kelantan from PAS, the Islam-based opposition party, which extended its control of the east coast state with an almost clean sweep.
The BN also lost a number of veteran politicians and cabinet ministers in one of the most highly contested elections since independence 50 years ago.
The biggest shock came with the defeat of S Samy Vellu, the longest-serving minister in the Malaysian cabinet and the president of the Malaysian Indian Congress, the sole ethnic Indian party represented in government. He lost the Sungai Siput constituency after 28 years.
Anwar Ibrahim, Malaysia's former deputy prime minister and Keadilan adviser, described the opposition performance as "a defining moment unprecedented in our nation's history".
"The people have voted decisively for a new era where the government must be truly inclusive and recognise that all Malaysians, regardless of race and colour, culture and religion, are a nation of one," he said.
An analyst speaking to Al Jazeera cited income disparity behind the swing away from the BN.
"It's the overall income disparity which is a bit more worrisome," Zainal Aznam Yusof, a government economic adviser, said.
"We have now one of the highest income disparity situations in Asia."
In many seats, voters went for anything but the government, although many ethnic Chinese and Indians voted for an opposition that promised racial equality, and a clean and transparent government.
Opposition supporters and police clashed in a
protest over phantom voters [Reuters]
Tricia Yeoh, director of the Centre for Public Policy Studies thinktank, said that the BN suffered a major electoral upset due to an "overwhelming protest vote".
"It shows a maturing society which doesn't necessarily vote solely upon racial lines," she said.
"They are voting according to principles instead and are practicing principles of mature democracy."
Late in the vote counting process, Musa Hassan, the inspector-general of police, banned victory celebrations and warned people against spreading rumours of riots by text message, or risk detention without trial under the internal security act.
All parties also urged their supporters to remain calm.
The last time the ruling party lost its majority was in 1969, when racial riots broke out in parts of Kuala Lumpur.
Authorities in the north-eastern state of Terengganu used tear gas to disperse about 300 people after PAS supporters clashed with police over concerns of electoral fraud. Nearly two dozen people were arrested.