The expulsion of police from their hotels in Catalonia under pressure from street protests illustrates Spanish Prime Minister Mariano Rajoy's growing struggle to keep control of the separatist-minded region, analysts say.
Police were able to close only about four percent of the polling stations while carrying out a violence-marred crackdown on would-be voters on Sunday, as regional leaders pushed ahead with a banned independence referendum.
Angered by the crackdown, an estimated 300,000 people took to the streets of Barcelona on Tuesday, shouting "occupation forces out".
Hundreds of police officers sent to the region to block the vote were chased out of their hotels by protesters who gathered outside.
For many Spaniards, such scenes highlight a growing sense that the authorities in Madrid are losing their grip on Catalonia.
"They are losing control, it is clear. And the government of the nation is taking steps in a very dangerous direction," Javier Perez Royo, a constitutional law professor at the University of Seville, told AFP.
Spain's King Felipe, the head of state, will address the nation at 9:00 pm (1900 GMT), in a sign that the crisis is deepening.
Images broadcast on Spanish television showed a crowd of people jeering and pounding on a van taking national police officers away from a hotel in Catalonia.
Locals have thrown eggs and fruit at a barracks housing Civil Guard military police, said Alfonso Merino, a spokesman in Barcelona for the main union representing officers of the force, the AUGC.
"The state is not doing enough. We don't see it," he said.
For Antonio Torres del Moral, a specialist in constitutional law, the Catalan regional government, or Generalitat, "has the initiative and the central government is running behind them clumsily trying to plug the holes."
"The Generalitat has created two or three slogans -- 'Spain robs us,' 'the right to decide', 'We are not subjects' -- and the state none. Their efficiency has been extraordinary," he added.
"It seems like the government has failed to control the situation and that it lost many points in Catalonia and in the court of international opinion."
Catalonia's leaders have pledged to declare independence from Spain in the wake of the vote, though their next move remains uncertain.
Torres del Moral said he was surprised that Catalonia's financial dependence on the central government had not stopped pro-separatist lawmakers from pushing ahead with their secession plans.
International ratings agencies have given Catalonia a low, "speculative" credit rating, meaning it has difficulty borrowing directly on financial markets and must depend on loans from the Spain's central government.
"They boldly and successfully challenge the state even though they are indebted to it," Torres del Moral said.
Torres added that he fears judges -- who have been thrust into the front lines of the bid to block the referendum by ordering the closure of polling stations -- will eventually become demoralised.
"They agreed to prosecute some personalities, they did their job and despite that, what remains in the minds of international opinion are the images of repression," he said.
Videos beamed around the world showed police dragging voters from polling stations by their hair, throwing people down stairs and attacking Catalan firefighters protecting polling stations.
Luis Rodriguez Vega, president of the Professional Judges' Association of Catalonia, said he did not believe the state "has lost control".
"But there is a clear disobedience and the proof of this if the holding of the referendum," he said.
Court decisions are "applied with a great deal of difficulty" in the face of the "dictatorship of regional institutions that do not accept the constraints of the constitution or the courts," he added.
Rajoy's critics accuse him of hiding behind judges in the face of the separatist challenge.
"You can't leave the problem solely in the hands of the courts, judges and prosecutors," said Emilio Fernandez, president of the UPF union of Spanish prosecutors.
"You need a political response in addition to a police and legal response," he said.
Jose Cobo, a spokesman for members of Spain's Guardia Civil police force, said the government found itself trapped when Catalonia's regional police force, the Mossos d'Esquadra, failed to close polling stations as ordered, leaving the task to national police.
"If we let them carry out the referendum, we are not carrying out our mission. If we send police to stop it, it is repression," Cobo said.
"Maybe we could have sent more police, but whatever we do, we lose."