The coalition was headed by Prime Minister Najib Razak, whose popularity plummeted after $1 billion went missing from a state-owned investment fund. Not only was some of the money used to fund "The Wolf of Wall Street" movie and diamonds for supermodel Miranda Kerr, nearly $700 million was found in Najib's personal bank accounts.
He had also overseen a sodomy conviction of the country's most popular opposition leader, Anwar Ibrahim, who was sentenced to five years jail. But it wasn't his first time behind bars.
Before his firing in 1998, Anwar was the country's deputy prime minister under Najib's predecessor Mahathir Mohamad. Days after leading a march of tens of thousands to demand Mahathir's resignation, Anwar was beaten, arrested and eventually found guilty of sodomy and corruption.
But ahead of the 2018 election Anwar, the opposition's de facto leader, agreed to work with his former enemy Mahathir, who is now 92-years-old, to unseat Najib. And they succeeded, winning 113 seats to Najib's 79.
Euan Graham, the director of the Lowy Institute's international security program, described the result as a "seismic shift" complete with "cinematic melodrama."
"The human element shows through very clearly. You have Anwar in his last gasp politically having held out, incarcerated by his nemesis Najib who now has now found himself in the unforeseen position of being the politically vanquished," Graham said.
"And who delivers the death blow but Mahathir himself, who did more than anyone else to institutionalise the Barisan Nasional [coalition] form of government for the bad as well as the good.
Not only will this election deliver the first change of government since 1957 and the world's oldest leader, Malaysia will also have its first female deputy prime minister.
It's expected that Anwar will be pardoned and will eventually lead the country. Until then, Anwar's wife Wan Azizah Wan Ismail, who considers Mahathir a "changed man," will serve as his deputy once he is worn in.
But that swearing in is no longer guaranteed. Police said on Thursday that Mahathir's inauguration has been cancelled and Najib did not concede at a press conference, though he acknowledged the election's results.
"I accept the verdict of the people," he tweeted.
Because no single party won a majority — the opposition is technically an alliance of parties — Malaysia's king, Sultan Muhammad V, will now decide the next prime minister. And according to Graham the outcome may not work in Mahathir's favour.
"The relationship between the royals and Mahathir has a lot of history behind it. Basically, they hate each other," Graham said, adding the king could choose this moment to "get revenge" on Mahathir for stripping the royals' of many of their powers when he was prime minister.
Malaysia's gerrymandering is legendary.
Due to malapportionment electorates have vastly different population sizes which radically affects the election outcome.
In rural areas there are electorates with small populations, in one case just 18,000 people. These areas are more likely to support the ruling coalition, and 29 of the 30 smallest electorates were held by the opposition.
But in urban centres that are more likely to vote for the opposition, there are 15 electorates with more than 100,000 constituents.
That means one person's vote can be 10 times as powerful in some rural, opposition-held areas.
Despite gerrymandering, postal ballots that never arrived, and numerous voters who were not allowed to cast their ballot despite waiting hours in line to vote, the opposition alliance managed to pull off a historic win.
One man who requested he be identified by the initials "JC" told Business Insider that based on the celebrations around him it felt like Malaysia had "won the World Cup or Olympics."
One woman who travelled back from Beijing to cast her vote and requested she only be identified by the initials, "CC," told Business Insider she "woke up in tears of joy."
"We are once again Malaysians regardless of races. We were torn apart by the last government," CC said.
Sarah Wong, a "runner" who helped hand deliver overseas ballots before the Wednesday 5. p.m. deadline, told Business Insider she waited up until 3.30 a.m. texting friends and waiting for the results to come in.
Wong describes the the potential for a female deputy prime minister as a "huge thing," which, as a young Malaysian female, seems "like a new era."
"People have never been more united, hopeful, dedicated and hungry for change. Regardless of the result, which party won, this proves the Malaysians' voice are heard through fair and clean election," Wong said. "Some Malaysians abroad are looking to return in the near future because they see amazing things are possible back here again."
That's the case for Houston-based Kristina Mariswamy, who moved to the US for college in 2006.
"I grew up accepting my government was corrupt and got away with it. I was doubtful we would ever see this day. But today i get to believe in democracy and my government again," said Mariswamy after trusting a pilot she had never met before to help deliver her postal ballot to her hometown that made it with just a few minutes left on the clock.
"More than that, for the first time in a while, I feel like I can go home and get a fair shot at a good life in Malaysia. It's painful to leave home, your family and friends, but you do it because you feel thats your best option for a better life. Today, I don't have to think that way anymore, and instead of hoping, I get to believe."