Spain's Guardia Civil police have detained 14 Catalan officials and raided regional government ministries involved in organising a banned independence vote.
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 regional leader complained of a power grab.
Spanish Prime Minister Mariano Rajoy said the state had been forced to act.
Catalonia's separatist government is defying a Constitutional Court order to halt the planned 1 October vote, which has been condemned by the Madrid government as illegal.
Wednesday's operation targeting over 20 ministries and institutions was a dramatic intensification of Spain's attempt to stop the vote taking place. At least six million ballot papers were found in a warehouse outside Barcelona, reports said.
And in a separate move Spain's finance minister, Cristóbal Montoro, said the national government was now set to take control of a large part of Catalonia's public finances.
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.
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. Spain's government has been backed by the Constitutional Court, which has suspended the referendum law passed by the Catalan parliament.
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.
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.
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.
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.
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.