KUALA LUMPUR—A transfer of nearly $700 million to Prime Minister Najib Razak’s alleged private bank account before a 2013 election was a “personal donation” from Saudi Arabia’s royal family and not illegal, a Malaysian investigating body said.

The nation’s top prosecutor, Attorney General Mohamed Apandi Ali, said on Tuesday all but $61 million of the $681 million transferred in March of that year was returned to the Saudis five months later.

...