Approximately 1,500 police officers were deployed to deal with a protest rally which saw more than two dozen people injured and seven people arrested.
The crowd gathered near Neptune fountain, some 300 metres from the Parliament, at around 8pm on Saturday.
Their anti-government chants were centred on the newly passed Citizen Security Law, a bill which will impose hefty fines on everything from unauthorized protests outside the Parliament to disrupting traffic with street football.
"These fascists want to silence citizens," demonstrators shouted.
The protest turned violent when a group of about 20 tried to overturn a police vehicle entering the area were protesters were gathered.
As reinforcements arrived, a sector of the crowd started throwing broken bottles and Molotov cocktails at riot police, 14 of whom were injured.
They also burned rubbish containers and used them to form a barricade, Spanish news agency EFE reported.
Local shopkeepers pulled down the steel shutters of their shops as the mood turned increasingly violent.
An attempt to break through the barricade and reach the Parliament was quashed by riot police, as were the crowd's attempts to continue the protest in Madrid’s emblematic Sol Square.
A total of seven people aged 18 to 37 were arrested on Saturday on vandalism charges and will appear before a judge on Monday.
Organizers of the Rodea el Congreso movement– Surround the Parliament in English- have insisted the demo was a peaceful one.
"People will continue to protest in the streets regardless of how many laws this fascists government passes," a spokesperson told Spanish newspaper El País.