The protests came after the Spanish Supreme Court detained five Catalan separatist leaders, including Catalan presidential candidate Jordi Turull. In total 25 people, the core of the movement, have been indicted over last year's independence drive.
Thousands of protesters descended on the streets of Catalonia late on Friday after Spain's supreme court detained five separatist leaders for their role in last year's independence bid.
The court also issued international arrest warrants for six other Catalan figures who have fled abroad, including former regional president Carles Puigdemont.
Twenty-four protesters were lightly injured in clashes with police, emergency services said.
Riot police used batons to keep the demonstrators away from the federal government offices in Barcelona.
The protest had been called on Thursday, by the Committees for the Defence of the Republic (CDR), before the court decisions were announced.
Spain's Supreme Court said on Friday it would prosecute 13 key Catalan separatists for "rebellion", a crime which carries a maximum penalty of 30 years in jail.
Five people were held in custody, including Catalan presidential candidate Jordi Turull who was due Saturday to seek a second round vote in the regional parliament, after failing to be elected earlier in the week.
A Supreme Court judge held former Catalan parliament president Carme Forcadell and three former regional ministers alongside Turull.
'The road to exile'
Judge Pablo Llarena decided that the five posed a flight risk, after Marta Rovira became the latest leading pro-independence figure to flee abroad to escape charges.
Rovira ignored the summons and announced she was taking "the road to exile".
The deputy leader of the leftwing separatist ERC party, whose chief is currently in jail, is currently in Switzerland, according to Spanish media.
Llarena also issued international arrest warrants for former Catalan President Carles Puigdemont, who is in self-imposed exile in Belgium along with four of his former ministers.
All five left Spain following a proclamation of independence for Catalonia in October. One of them, Clara Ponsati, has since moved on to Scotland.
Four other separatists had already been detained by the Spanish authorities.
In total 25 people, the core of the movement, have been indicted over last year's independence drive.
The court decisions further inflamed the protesters in Barcelona, some of whom burnt pictures of King Felipe VI, a crime in Spain, as well as photos of judge Llarena.
They waved separatist flags and chanted "Freedom for the political prisoners".
Another, calmer, rally filled the huge Catalonia Square in central Barcelona.
"Catalonia has never felt like part of Spain," said 22-year old Alba Mateu, one of the demonstrators.
"There are two million people who want to leave Spain and they can't put us all in prison," his 58-year-old mother Carme Sala added.
Catalan television aired footage of more crowds in towns in the region, including Vic and Tarragona.
The judicial action in recent weeks has hit the Catalan independence movement, with some of its main players giving up their public roles while others have toned down their rhetoric.
Judge Llarena, in announcing his ruling, cited injuries to sixty Spanish policemen who had attempted to prevent an independence referendum from going ahead in Catalonia on October 1.
Llarena said he considered that the current "attack on the State" was of a "gravity .. without comparison in neighbouring democracies".
Catalan independence referendum
The crisis was sparked by a referendum, banned by Madrid, which led to the declaration of independence.
That declaration then led to the Spanish authorities imposing direct rule over the region, a situation which has so far lasted five months with Catalonia's autonomy suspended.
In his 70-page ruling Llarena set out the reasons for the rebellion charges which imply the existence of a "violent uprising", which some jurists contest.
The supreme court judge did not mention the treatment meted out by police on voters queueing by polling stations, images of which were flashed around the world.
The separatist parties won regional elections in December called by Madrid after they attempted to secede, retaining their absolute majority in parliament.
But they have still not been able to form a government and face growing legal pressures.
With numerous leaders abroad or in jail, the separatists have struggled to re-organise or even remain in politics. Three more members of the parliament announced Thursday they were giving up their seats.
In a broad alliance swinging from centre-right to far left, the separatists failed to elect a new regional president on Thursday after their most radical faction refused to back Turull in a vote of confidence.
A second round parliamentary vote was due to take place Saturday.