Spanish police have detained 14 Catalan officials and raided regional government ministries involved in organising an independence vote declared illegal by Spain's government.
Tensions were already high before Josep Maria Jové, number two in the Catalan vice-presidency, and others were held.
Thousands of Catalans took to the streets in protest and the region's president complained of a power grab.
Spanish Prime Minister Mariano Rajoy said the state had been forced to act.
The region's separatist government is defying an order by Spain's Constitutional Court to suspend the 1 October referendum law passed by the Catalan parliament last month.
Wednesday's operation targeting over 40 ministries and offices as well as three private companies was a dramatic intensification of Spain's attempt to stop the vote taking place.
An estimated 10 million ballot papers were found in a warehouse outside Barcelona, reports said.
There were scattered protests outside a number of buildings, but the biggest was outside the Catalan economy ministry in the heart of Barcelona. Scuffles were reported as police tried to remove documents from the foreign affairs building.
In a separate move Spain's finance minister, Cristóbal Montoro, announced the national government was now set to take control of the Catalan regional budget, so that the state would pay for essential public services, rather than transfer the money to Barcelona.
After an emergency cabinet meeting Catalan President Carles Puigdemont accused the Madrid government of "de facto" suspending the region's autonomy and imposing a state of emergency.
Why is Spain cracking down?
Eleven days ahead of the planned vote on 1 October, the national government has made its biggest move yet to stop it happening.
Spain did not stop an earlier vote taking place in November 2014, but this time the Catalan leadership plans a declaration of independence within 48 hours of a Yes vote.
Mr Rajoy said the regional government had been warned that they were destroying Spain's national sovereignty, "There's no democratic state in the world that would accept what these people are planning," he said. He urged the Catalan president to comply with the law and put his secessionist challenge into "reverse gear".
Several ministries in Barcelona were raided on Wednesday, including the economy, foreign affairs, telecoms, social affairs and presidency buildings. Among those detained were officials from the economy ministry, run by Catalan Vice-President Oriol Junqueras, as well as figures from other departments.
Those held are suspected of misappropriating funds for the vote and misusing confidential data on taxpayers.
Police were searching for computer equipment and any documentation linked to the planned vote. The day before, they seized some 45,000 envelopes with the Catalan government's logo from a private delivery company in Terrassa, north-west of Barcelona.
On Friday, the Spanish finance minister gave Oriol Junqueras a deadline to call off the vote or see funding for essential services in Catalonia taken over by Madrid. A letter was sent to Mr Junqueras late on Tuesday reminding him the deadline had passed.
A risky escalation
By James Badcock, BBC News, Madrid
The spate of raids and arrests in Barcelona is a clear escalation by the Spanish state as it tries to deactivate the planned referendum.
Previous raids have targeted sites suspected of holding electoral material. Arresting officials from an elected government risks further polarising Catalan society between those who want independence and those who do not.
Although the Catalan independence movement has so far been peaceful, raids on government premises carried out by a Spanish militarised police force, the Guardia Civil, create uncomfortable echoes of the Franco dictatorship.
Demonstrators are already taking to the streets to protect their "right to decide". And there is a risk of clashes between pro-independence activists and police forces with orders to stop the vote.
How are Catalan leaders responding?
As the Catalan president condemned Spain's "anti-democratic and totalitarian actions", another Catalan leader called for peaceful resistance to protect the buildings as the regional government met in emergency session.
"The time has come - let's resist peacefully; let's come out and defend our institutions," the president of the Catalan National Assembly, Jordi Sánchez, tweeted.
He did not have to wait long. Protesters gathered outside the economy ministry as the police operation took place, chanting "We will vote" and surrounding the Guardia Civil cars stationed outside.
The centre of Barcelona soon became a sea of Catalan flags and the city's renowned football club threw its weight behind the protests, condemning any act that threatened freedom of speech and self-determination.
The Catalan vice-president accused Spanish police of attacking the region's institutions and therefore its citizens too. "We will not allow it," he said.
1. Faced with the authoritarian turn of the state, Barcelona stands by Catalan institutions and defends Catalan self-rule— Ada Colau (@AdaColau) September 20, 2017
In Madrid, Catalan separatist MP Gabriel Rufián told the prime minister in parliament he should take his "dirty hands" off Catalonia's institutions, Efe news agency reported.
Barcelona Mayor Ada Colau warned that if Mr Rajoy "persists with this repressive strategy, he'll find diverse, pro-Catalan voices more united than ever defending rights and freedom".
Do Catalans want independence?
Some 7.5 million people live in Spain's well-off north-eastern region and a majority are thought to be in favour of having a vote. However, one survey commissioned by the Catalan government in July suggested that 41% of voters backed independence while 49% were opposed.
Catalan nationalism has been stirred by Spain's economic crisis. While Catalonia is one of Spain's wealthiest regions, Catalans argue they pay more into the national budget than they get back. And a 2010 Constitutional Court ruling fuelled nationalist anger when it set limits on Catalan claims to nationhood.
In the non-binding 2014 vote, branded illegal by the Madrid government, just 2.2 million voters out of a potential 5.4 million turned out. Officials said 80% of them backed independence.