Malaysian police have used tear gas and water cannon to disperse thousands of people gathering to demonstrate against a security law allowing detention without trial.
Hundreds of police officers were awaiting the protesters as they arrived at three rallying points in Kuala Lumpur, the capital, for the banned demonstration on Saturday.
"There was no violent confrontation coming from the protesters but they were tear-gassed and dispersed," Al Jazeera's Harry Fawcett, reporting from Kuala Lumpur, said.
"They tried to meet again near a department store and were tear-gassed again there and water cannon were fired.
"They have been swiftly and pretty heavily dealt with."
Witnesses said police charged at the protesters with batons.
About 20,000 protesters took part in the protests in three different areas, the Star newspaper and Malaysiakini news Web site reported.
The protesters had planned to march towards the national palace, but scores of people were reportedly detained even before they had reached the rally.
Before the march started, Muhammad Sabtu Osman, the Kuala Lumpur police chief, said that 150 people - identified as protesters because they were wearing opposition t-shirts and headbands - had been detained to prevent them from taking part.
"We don't fear arrest. ISA [internal security act] is a cruel act, we are fighting for justice"
Siti Mariah Mahmud, a politician from the opposition Islamic PAS party, criticised the arrest of protesters as they attempted to enter the national mosque.
"This is not reasonable. It's prayer time and this action is a breach of our religious freedom and duty," she said.
Organisers said they intended to present a 10-point memo to the king, including demands for the abolition of the Internal Security Act (ISA) and the closure of a camp in northern Perak state where detainees are held.
"We are here to fight for the ISA to be abolished," Yati Ali, one of the protesters, said. "We don't fear arrest. ISA is a cruel act, we are fighting for justice."
Datuk Hishammuddin Hussein, Malaysia's home minister, told Al Jazeera that some protesters were planning riots.
"The position of the police and the government is to ensure that nothing untoward happens with certain groups that want to exploit the situation for their own political reasons," he said.
"That is something we will not tolerate ... whether you are for or against the ISA."
Human rights groups estimate that at least 17 people are being held under the act, which was originally instituted under British colonial rule.
Najib Razak, the Malaysian prime minister, on Friday urged people not to join the protest, adding that he had already promised to review the law.
Most of those being held under the ISA have been accused of links to Islamic militancy and document forgery, but human rights groups say it has also been used to jail government critics.
Human rights activists have held numerous smaller rallies over the years to protest against the security act, but Saturday's protest received a boost after opposition parties urged their supporters to come out in force.