abdullah badawi appointed petronas advisor
A Petronas fuel station is seen with the Petronas Twin Towers in the background in Kuala Lumpur, Malaysia. Picture taken February 10, 201 Reuters

Malaysia appointed former minister Abdullah Ahmad Badawi to the high-profile role of adviser to state oil firm Petronas, a move seen as an affront to senior leader Mahathir Mohamad.

Mahathir, Malaysia's longest serving prime minister, had been fired from the key role after he stepped up the campaign demanding the resignation of Prime Minister Najib Razak.

"The Cabinet agreed to the appointment of former Prime Minister, Tun Abdullah Ahmad Badawi, as the new Petronas adviser," Najib said in a statement on Friday.

The appointment of Badawi, who had succeeded Mahathir as prime minister in 2003, will take effect from April 1.

Mahathir had handpicked Badawi as his successor, but he fell out with his mentor, who became a fierce critic of Badawi in later years.

Badawi stepped down as the leader of the party in 2009 following an electoral setback in 2008 when the ruling Barisan Nasional coalition lost a two thirds majority.

criminal investigation against mahathir mohamad
Malaysia's former prime minister Mahathir Mohamad during an interview with Reuters at his office in Petronas Towers, Kuala Lumpur, Malaysia, October 22, 2015

Mahathir supported Najib, who succeeded Badawi initially but the relationship soured over the years and took a turn for the worse when Najib faced corruption allegations over 1 Malaysia Development Berhad funds.

Mahathir and his son Mukhriz, who was the chief minister in the Kedah province, led the uprising against Najib. Mukhriz was eventually forced out of the position of mantri bezar in the northern Malaysian state, dealing a blow to the political patriarch.

Mahathir hit back by launching a citizens' movement demanding the tainted prime minister's resignation. He then quit the United Malay National Organisation (Umno) party he led for decades, calling it was Najib's party.

Najib retaliated by removing the 90-year-old leader from the position of the advisor to Petronas on March 11, even as the Barisan Nasional leaders stood defended him.

Earlier this week, Mahathir filed a lawsuit accusing Najib of corruption and abuse of power.

In his latest effort to remove Najib from office, Mahathir cited the corruption scandal plaguing 1 Malaysia Development Berhard and the personal donation Najib received from overseas.

Mahathir says Najib misused his power by trying to smother investigations into both these scandals. The lawsuit alleges that Najib took various deliberate steps in bad faith to "obstruct, interfere, impede and derail" various investigations and inquiries.

In the lawsuit, Mahathir requests action to "reverse the destruction of the rule of law and the sanctity of the provision of our Federal Constitution".

Najib Razak has been reeling from allegations that he diverted hundreds of millions of dollars from the state-owned company into his personal account in the run up to the 2013 election.

In January, Malaysia's Attorney-General Mohamed Apandi cleared Najib of any wrongdoing, saying the money deposited in the prime minister's bank account was entirely legal "personal donation" from the Saudi royal family and that the prime minister had returned money to the Saudis.

The attorney general said Najib had returned US$620 million to Saudi's royal family from his personal bank account in 2013.