Malaysian Prime Minister Najib Razak, stung by allegations that he received some $700 million in government money, fired the attorney general who had been investigating him and a deputy who has been among his most prominent critics on Tuesday.

Najib is under increasing pressure over leaked confidential documents that allegedly show the money, from state investment fund 1MDB, went into his personal accounts.

Najib announced over national television Tuesday that his deputy Muhyiddin Yassin will be replaced by Ahmad Zahid Hamidi, a Cabinet member who will also retain his home minister portfolio. Earlier Tuesday, the government announced it had terminated the services of Attorney General Abdul Gani Patail.

Najib said he also dropped four other ministers to strengthen his administration and ensure they can “work as a team.”

“I can accept differences in opinion and criticisms as part of the decision-making process, but these differences in opinion should not be made in an open forum that can affect public perception of the government and the country,” he said.

Critics slammed Gani's abrupt removal and cast it as an attempt by Najib to avoid prosecution.

“The purge commences. The Attorney-General is replaced. Any flicker of hope that the prime minister might be charged for misdeeds is extinguished,” opposition lawmaker Tony Pua tweeted.

“The fact that he is not answering the allegations but instead removed his critics is not a good sign,” said Wan Saiful Wan Jan, who heads the Institute for Democracy and Economic Affairs think tank. “It shows deep desperation on Najib's side.”

Muhyiddin, the deputy, has been critical of the government's handling of 1MDB's massive debt and on Sunday night repeated his call for Najib to explain the alleged funds transfer.

Najib said, “The decision to replace Muhyiddin was a very difficult one, but I had to do it so that a strong team can move forward.”

Gani was replaced by a federal court judge, Mohamed Apandi Ali, months before the attorney general had been due to retire in October. The government said Gani was leaving for health reasons, but when contacted by Malay Mail Online, Gani said he had not been aware of the decision.

Gani confirmed earlier this month that he had received documents from investigators that linked Najib and 1MDB. The existence of the documents, which allegedly show $700 million was wired from entities linked to 1MDB into Najib's accounts, were first reported by The Wall Street Journal.

Najib has not disputed the existence of the accounts or the receipt of the funds. He has only said that he has never used government funds for personal gain, and called the allegations a political sabotage. Officials with 1MDB also have denied wrongdoing.

The documents sent to the attorney general pave the way for possible criminal charges, which would be a first for a Malaysian prime minister.

Apart from Muhyiddin, Najib also dropped Shafie Apdal as rural development minister. Shafie, a vice president in Najib's ruling Malay party, has also been critical of the government's handling of the 1MDB saga. On Tuesday he defended his comments, saying in a statement that they were aimed at strengthening the party and putting the country on the right track.

Najib's ruling National Front coalition has been in power since independence from Britain in 1957. However, support for the coalition has eroded in the last two general elections. In 2013, it won the polls but lost the popular vote for the first time.

The Associated Press