KUALA LUMPUR -- Malaysia's opposition coalition, led by former Prime Minister Mahathir Mohamad, won a majority of lower house seats in Wednesday's general election, paving the way for the country's first change of power since its independence in 1957.

Mahathir, 92, is expected to become Malaysia's seventh prime minister, returning to power 15 years after leaving office.

According to the country's Election Commission, the opposition coalition Pakatan Harapan, or Alliance of Hope, with an affiliate party has secured at least 112 of the 222 house seats. An opinion poll prior to the election suggested that the opposition would win the popular vote, but the ruling coalition Barisan Nasional, or National Front, was likely to win more seats owing to the first-past-the-post system along with district boundaries that have traditionally favored the ruling coalition.

At a news conference held in the wee hours on Thursday, Mahathir declared victory. "[Today] we will have a swearing-in ceremony for the prime minister," an elated Mahathir said.

He also promised that the new government will not seek vengeance against outgoing Prime Minister Najib Razak. "What we want is to restore the rule of law," said Mahathir, who also revealed that the palace has contacted the opposition.

Mahathir, once mentor to ruling coalition leader Najib Razak, left a key party of the National Front and joined the opposition, demanding that Najib step down after the prime minister was allegedly tied to a financial scandal at state fund 1Malaysia Development Berhad.

Over the years Najib has seen his popularity wane due to rising living costs, caused partly by introduction of a goods and service tax in 2015.

In the 2013 election, the National Front failed to obtain a majority of the popular vote, but managed to secure a majority of seats in the lower house. This time, many ethnic Malays, who have traditionally supported the ruling coalition, are said to have switched allegiances.

Malays make up the majority of the population, followed by ethnic Chinese and Indians.

Members of the upper house are appointed, not elected, and do not have much legislative power.

Some analysts had forecast a rough road ahead for the government were the opposition to win, mainly because the nation has never experienced a change of power, and new ministers lack experience.