Malaysia’s top prosecutor, attempting to extinguish a monthslong scandal, said a nearly $700 million transfer to Prime Minister Najib Razak’s private bank account was an entirely legal “personal donation” from Saudi Arabia’s royal family.

Attorney General Mohamed Apandi Ali’s announcement was greeted with skepticism. A Saudi government official, while declining to comment specifically on the prosecutor’s statement, said the Saudi ministries of foreign affairs and finance had no information about such a gift and that a royal donation to the personal bank account of a foreign leader would be unprecedented. Representatives of the royal family couldn’t be reached for comment. Critics of the Malaysian prime minister said it was implausible the money had come as a personal donation.

Mr. Apandi said Tuesday all but $61 million of $681 million transferred in March 2013 was returned to the Saudis five months later. He said the Saudis asked for nothing in return for the gift.

Mr. Apandi, who was appointed to the position by Mr. Najib when his predecessor stepped down soon after the scandal broke, said he ordered Malaysia’s anticorruption body to close its probe into the transfers, which sparked mass street protests against the prime minister after they became public last summer.

The U.S. Federal Bureau of Investigation and other government agencies from outside Malaysia continue to investigate the transfer. Some international investigators don’t believe the nearly $700 million came from Saudi Arabia, according to a person familiar with the inquiries.