Tensions are high in the Spanish region of Catalonia ahead of more planned protests by referendum supporters.
Overnight, police occupied the region’s economy ministry as hundreds of protesters remained outside.
Catalan economy minister Josep Maria Jové was one of more than a dozen senior officials detained by authorities on Wednesday.
Spanish Prime Minister Mariano Rajoy urged separatists to abandon their plans for a 1 October referendum.
In a televised address, he asked the region’s government to give up its “escalation of radicalism and disobedience”.
The leader of the Catalan government Carles Puigdemont has accused Spain of “co-ordinated aggression”, but Mr Rajoy insisted that Catalonia must respect Spain’s laws and democracy.
Pro-independence organisations have urged protesters to return in force to the streets on Thursday.
Police searches in the Catalan capital, Barcelona, on Wednesday sparked a mass street protest, with police saying up to 40,000 people had gathered outside the devolved government’s economy ministry in the city.
Several hundred stayed on past midnight and some scuffles were reported and objects were thrown as police tried to exit the building. Police charged some protesters trying to block their passage. Three police patrol cars were damaged.
Another focus of protests was the headquarters of the radical CUP party, which backs the referendum. There were protests into the night in other Catalan towns, such as Tarragona and Berga.
Police have seized large amounts of referendum material.
Earlier on Wednesday, Mr Puigdemont accused the central government of effectively suspending devolution after it moved to seize control of regional finances to stop them being used to fund the referendum.
“Spain has de facto suspended the self-government of Catalonia and has applied a de facto state of emergency,” he said.
“We believe that the Spanish government has crossed the red line that separated it from repressive authoritarian regimes and has become a democratic shame.”
Separatist parties who control the Catalan parliament pushed through the referendum law earlier this month after unsuccessfully demanding for years the right to hold a free vote on self-determination.
Catalonia, a wealthy region of 7.5 million people in north-eastern Spain, has its own language and culture but is not recognised as a separate nation by the Spanish state.