BANGKOK — Tens of thousands of demonstrators in Malaysia defied police orders on Saturday, massing in the capital in a display of anger at the government of Prime Minister Najib Razak, who has been accused of corruption involving hundreds of millions of dollars.

The demonstration in central Kuala Lumpur, which had been planned for weeks, was declared illegal by the Malaysian police, and on Friday the government went as far as to pass a decree banning the yellow clothing worn by the protesters.

But the demonstrators, who represent a broad coalition of civic organizations in Malaysia, including prominent lawyers, asserted their right to protest on Saturday. Among other issues, they are angered at the transfer of 2.6 billion ringgit, about $630 million, into the personal bank accounts of Mr. Najib.

The government has acknowledged that Mr. Najib received the money in 2013 and said it was a donation from undisclosed Arab royalty. Opposition groups have ridiculed the government’s explanations for the cash transfer, citing a Wall Street Journal report that said investigators had tracked the money to companies linked to a sovereign wealth fund headed by Mr. Najib, called 1Malaysia Development Berhad, or 1MDB.