Kuala Lumpur, Malaysia (CNN) -- Malaysian authorities cracked down on protesters demanding free and fair elections Saturday, firing tear gas and arresting more than 1,600 people.
Some 1,667 people had been arrested as of early evening, according to the Royal Malaysia Police, with 16 children among them. Protest organizers said at a news conference earlier in the day that about 400 had been detained.
By Saturday night, police said the crowds had been dispersed.
The government said the protest, organized by a loose coalition of opposition groups known as Bersih 2.0, was illegal. It had already declared Bersih an illegal organization and police said anyone found with Bersih-related materials, such as yellow T-shirts, could be arrested.
"Malaysians of all walks of life overcame the oppressive acts of the police to come out peacefully and in incredibly large numbers to show their love for their country and for the principles of justice," the coalition said on its website.
"We are nonetheless horrified that several hundred people have been detained, many of them without any justification whatsoever," it said.
Opposition leader Anwar Ibrahim was among hundreds of protesters who gathered at the Hilton hotel in Kuala Lumpur before heading toward the Sentral Station.
There the protesters breached police lines to march through the rail station, before being met by riot police with tear gas on the other side.
Ibrahim posted on his Twitter account that he had sustained a minor injury during the demonstration and that a staff member had been badly hurt. He also said his youngest daughter had been arrested.
Writing on his blog ahead of the protest, Ibrahim said the "intended peaceful gathering" was to bring Malaysians together "as one united people in pursuit of clean and fair elections."
He went on: "Our reason for gathering is pure and simple -- to demand that the electoral roll be cleaned, that the postal voting system be reformed, that indelible ink be used, a minimum 21 day campaign period be instated, free and fair access to media for all be provided, public institutions be strengthened, and for corruption as well as dirty politics to be stopped."
Opposition groups have been seeking to put pressure on the ruling party, which has been in power for decades, ahead of elections expected to be called next year.
Among their demands are the use of indelible ink to ensure that voters cannot cast more than one ballot and an extension of the campaigning period,
The Malaysian state news agency Bernama reported that the prime minister had attended an event Saturday at which he described the protest as "an illegal rally organised by a section of our community."
"If there are people who want to hold the illegal rally, there are even more who are against their plan to hold the illegal gathering," he is quoted as saying.
There was a strong police presence around the city and many roads had been closed off, local media reports said.
A similar demonstration called by the Bersih coalition in 2007 was broken up by police using water cannon and tear gas, local reports say.
CNN's Eve Bower contributed to this report.