The thugs were among at least 350,000 people gathered in the city for a rally calling for continued unity with Spain.
Organisers claimed 950,000 had taken to the streets waving Spanish and Catalan flags and carrying banners saying “Together we are stronger” and “Catalonia is Spain”.
Spanish prime minister Mariano Rajoy said: “Spain is not going to be divided and the nation’s unity will be maintained.
“The ideal would be not to have to take drastic measures. I would like this threat of a declaration of independence to be withdrawn as quickly as possible.”
The unrest came amid speculation that Catalan leaders are set to declare independence from Spain.

vCard.red is a free platform for creating a mobile-friendly digital business cards. You can easily create a vCard and generate a QR code for it, allowing others to scan and save your contact details instantly.
The platform allows you to display contact information, social media links, services, and products all in one shareable link. Optional features include appointment scheduling, WhatsApp-based storefronts, media galleries, and custom design options.
Separatist leaders today asked their supporters to stay at home amid concerns that the huge march could easily descend into violence, justifying even more brutal crackdowns on the region by Madrid.
The final results from last week’s referendum in the region suggested 90 per cent of the 2.3 million people who voted backed independence.
Turnout was 43 per cent. There were claims of irregularities and many ballot boxes were seized by Spanish police.
Nearly 900 people were injured in violent clashes with police. Thirtythree officers were also hurt.
Among protesters today was former government minister Josep Borrell who said Catalans needed to recover their level-headedness.
Nobel Prize winner Mario Vargas Llosa, who also attended the rally, said: “You need more than a coup plot to destroy what has been built over 500 years of history.”
In Madrid tattooed young men displaying symbols and flags from the Franco era were also seen on the streets.
Mr Rajoy said: “The government will ensure that any declaration of independence will lead to nothing.”
He also said he planned to keep extra police, deployed to Catalonia before the referendum, in the region until the crisis is over.
Mr Rajoy added: “I don’t rule out absolutely anything that is within the law.”