Tens of thousands of Malaysians protested over the weekend in the capital Kuala Lumpur and elsewhere, calling for Prime Minister Najib Razak to step down over a financial scandal.
The protesters are angered by a $700m (£455m) payment made to his bank account from unnamed foreign donors.
It was discovered last month during a probe into alleged mismanagement at the debt-laden state fund 1Malaysia Development Berhad (1MDB).
Mr Najib has denied any wrongdoing.
The rally began on Saturday and continued into Sunday. The pro-democracy group Bersih has also called for protests in the cities of Kota Kinabalu and Kuching on the Malaysian side of Borneo.
Protesters in yellow T-shirts sang the national anthem Negaraku to end the rally at the stroke of midnight, when the country started celebrating National Day - 58 years since independence.
Kuala Lumpur authorities rejected an application from Bersih for a permit and Malaysian police declared the rallies illegal. Access to Kuala Lumpur's Independence Square was blocked.
At the last big rally in 2012, police used water cannon and tear gas to disperse protesters.
Estimates put the number of protesters in Kuala Lumpur at 50,000 to 80,000, though figures issued by the police suggested much lower numbers.
A carnival atmosphere, punctuated by music, vuvuzelas and political speeches, prevailed in the city centre.
The leader of Bersih, Maria Chin, said the protest was not anti-government.
"We don't want to topple the government but we want to topple corrupt politicians," she told the Malaysian Insider.
The demonstrations coincide with preparations for National Day on Monday - the former British colony's 58th anniversary of independence.
Mr Najib said on his blog he did not want a "provocation" to be triggered.
He said: "Whatever the disagreements or misunderstandings between us, National Day should not be a stage of political disputes."
The main accusation against Mr Najib is that he took $700m from the indebted 1MDB, which he established in 2009 to try to turn Kuala Lumpur into a financial hub.
Cabinet ministers have said the money transfers were "political donations" from unidentified Middle Eastern sources, and that there was nothing improper. No further details have been given.
1MDB has said it has never given money to the prime minister and called the accusations "unsubstantiated".
The prime minister retains significant support from the long-ruling Barisan Nasional coalition and from within his party, the United Malays National Organisation.
What is 1MDB?
• The 1Malaysia Development Berhad state investment fund was established under Prime Minister Najib Razak in 2009 to transform Malaysia into a high-income economy.
• Critics say the fund overpaid for many of its investments and spent millions on fees to investment bank Goldman Sachs
• It began attracting attention at the end of 2014 when it started missing payments to creditors. It later emerged that the fund was mired in $11bn (£7bn) of debt.
• Mr Najib has been accused of taking $700m from the fund - a charge which he has denied.
• Malaysia anti-corruption commission said it had verified that the money was a donation from unnamed foreign donors.
Read more: 1MDB, the case that's riveting Malaysia