It sounds like the infamous scam where someone claiming to represent a former minister from a corrupt African country offers you millions in return for your bank account details.

Only, this time, the vast riches with no strings attached were actually true, at least according to Malaysia’s attorney-general, who attempted Tuesday to draw under a line under a scandal that has badly dented the image of the relatively prosperous south-east Asian country.

Mohamed Apandi Ali told a press conference that transfers of $681 million to the bank account of Najib Razak, the country’s prime minister, had been traced back to the Saudi royal family–but he stressed that the money wasn’t a bribe and that Razak had committed no crime in accepting the money. Heck, he’d even given 90% of it back ‘unused’ within five months.

Mr. Razak has been under investigation for allegedly misappropriating over $1 billion in funds related to state-backed investment fund 1MDB, which has been plagued by losses on its investments and is under investigation in the U.S., Switzerland and Hong Kong. Razak is chairman of its advisory board.

It’s arguably the biggest political scandal in the oil-rich Asian country since deputy prime minister Anwar Ibrahim was hounded out of office on bogus charges of corruption and homosexuality in 1998. Anwar was convicted in a trial criticised by the U.S. and started a five-year prison sentence last year.

“I am satisfied with the findings that the funds were not a form of graft or bribery,” Ali was quoted as saying by Reuters. “There was no reason given as to why the donation was made to PM Najib, that is between him and the Saudi family.”

He added that Razak had sent back $620 million in August 2013, five months after the initial transfer because it hadn’t been used.

Malaysia’s Anti-Corruption Commission (MACC) had earlier said the funds were a political donation. Ali, perceived by many as an ally of the ruling United Malays party, said he will now instruct the MACC to close its investigations.