Malaysia’s attorney-general cleared Prime Minister Najib Razak of any criminal offence or corruption today, and said a controversial transfer of $681 million into his personal bank account was a gift from Saudi Arabia’s royal family.

The leader of the main opposition party denounced the findings, which came after months of pressure on Najib to resign over the scandal, saying the appointment of the attorney-general by the prime minister himself suggested a conflict of interest.

The involvement of the Saudi royal family is an unexpected twist in the saga over the mysterious funds transfer and the troubles of indebted state fund 1Malaysia Development Berhad (1MDB), whose advisory board Najib chairs.

“I am satisfied with the findings that the funds were not a form of graft or bribery,” Attorney-General Mohamed Apandi Ali told a hastily called news conference.

Apandi said in a statement that $620 million was returned to the Saudi royal family in August 2013, about five months after the transfer, because it had not been utilised.

“There was no reason given as to why the donation was made to PM Najib that is between him and the Saudi family” he said.

Apandi said no criminal offence was committed by Najib in relation to three investigations submitted by Malaysia’s anti-graft agency and that no further action would be taken.

The Malaysian Anti-Corruption Commission (MACC) had earlier said the funds were a political donation from an unidentified Middle Eastern benefactor.

The attorney-general said in a statement he would return to the MACC papers pertaining to the three separate investigations with instructions to close all three cases.

At the height of the scandal in mid-2015, Attorney-General Abdul Gani Patail – who had led probes into 1MDB – was replaced by Apandi, a former federal court judge with strong ties to Najib’s United Malays National Organisation (UMNO) party.

“The attorney-general should not have been involved in the decision affecting the PM because he was appointed by the PM,” said Lim Kit Siang, parliamentary leader of the opposition Democratic Action Party.

“It was very controversial circumstances when Gani Patail was sacked. It is a conflict of interest,” he said.

Najib, who has weathered repeated calls from opposition leaders and establishment figures to quit, has denied any wrongdoing and says he did not take any money for personal gain.

His office declined to make any comment on the attorney-general’s findings.