Crowds of protesters in Spain’s Catalonia region clashed with police after the Supreme Court stepped up legal action against separatists.
Spain’s Supreme Court ruled 25 Catalan leaders should be tried for rebellion, embezzlement or disobeying the state.
Convictions could result in up to 30 years in prison.
More than 20 people were injured as police used riot batons to keep protesters away from federal buildings in Barcelona on Friday night.
Demonstrations also took place in other parts of Catalonia.
In Madrid, a Supreme Court judge ordered five more Catalan leaders to be detained without bail, pending trial over their involvement in October’s banned independence referendum.
One of those taken into custody was Jordi Turull, who was to be the subject of a vote in the Catalan parliament on Saturday for regional president.
Other separatist figures were already in custody or had gone into exile abroad.
Friday night’s rallies had been organised by a separatist group before the court decisions were announced.
But the rulings appeared to inflame the protesters and angry crowds confronted lines of riot police protecting Spanish government buildings in Barcelona.
They waved flags and chanted independence slogans while some burned pictures of the Supreme Court judge and of Spain’s King Felipe.
Tensions spilled over into violence as some protesters tried to break through police lines.
A calmer rally took place in Catalonia Square, in the city centre.
One protester there, Carme Sala, said: “There are two million people who want to leave Spain and they can’t put us all in prison.”
Catalan TV showed rallies in support of the jailed leaders elsewhere in the region including in the cities of Vic and Tarragona.