BARCELONA, Spain (AP) — Spanish riot police smashed their way into Catalan polling stations Sunday to try to halt a disputed referendum on independence, firing rubber bullets and attacking voters who were trying to stop them from confiscating ballots. The daylong melee injured at least 460 civilians and 11 police, authorities said.

Police were acting on orders from the Spanish government to stop the voting, which Spain’s Constitutional Court had declared illegal.The dispute over the independence vote in Catalonia, a wealthy northeastern region of 7.5 million people, has plunged Spain into a constitutional crisis. Spain’s violent crackdown on the vote — videos showed police roughing up voters — appeared likely only to harden positions on both sides.

The dispute over the independence vote in Catalonia, a wealthy northeastern region of 7.5 million people, has plunged Spain into a constitutional crisis. Spain’s violent crackdown on the vote — videos showed police roughing up voters — appeared likely only to harden positions on both sides.

At the Pau Claris School in Barcelona, footage by one voter showed police aggressively removing people blocking their way, in one case dragging a person by the hair and in other cases pushing them down a flight of stairs.

The people seen in videos being hit, kicked and thrown around by police included elderly people with their dogs, young girls and regular citizens of all stripes. Many tried to shield themselves from being smacked on the head. Some people were screaming in fear.

It’s still unclear is how many of the region’s 5.3 million voters were able to turn out Sunday, how their votes would be counted, how many votes have confiscated already by police and what happens next if the separatist officials who run the region’s government declare independence based on the vote.

Spanish and Catalan officials traded blame for the chaos even as the voting continued Sunday afternoon.

Police move back to their vans followed by members of the public after storming into polling station to confiscate ballot boxes and ballots where the President Carles Puigdemunt will vote later today on October 1, 2017 in Sant Julia de Ramis, Spain. (David Ramos/Getty)

“Police brutality will shame forever the Spanish state,” independence-minded Catalan President Carles Puigdemont said as crowds cheered.

Spanish deputy prime minister Soraya Saenz de Santamaria said police acted with “firmness and proportionality” and accused the Catalan government of gross irresponsibility in staging the banned vote.

“There hasn’t been a referendum or the semblance of one,” she said.

Police officers fired the rubber bullets while trying to clear protesters in Barcelona who were trying to prevent National Police cars from leaving with ballot boxes confiscated from a voting center.

The confrontation shows signed of escalating even though both sides had said they did not want violence. Barcelona Mayor Ada Colau says more than 460 people have been injured in Catalonia in clashes with Spanish police, some seriously. Spain’s Interior Ministry said 11 police were injured in the clashes.Tensions were running so high that Barcelona played its soccer game against Las Palmas without fans at the Camp Nou stadium. The team announced the match would be played behind closed doors with less than a half hour to kickoff, with thousands of soccer fans already outside the stadium. Barcelona wanted to postpone the game but said the Spanish league refused the request.

Tensions were running so high that Barcelona played its soccer game against Las Palmas without fans at the Camp Nou stadium. The team announced the match would be played behind closed doors with less than a half hour to kickoff, with thousands of soccer fans already outside the stadium. Barcelona wanted to postpone the game but said the Spanish league refused the request.

The vote was called in early September, crystalizing years of defiance by separatists in the affluent region that contributes mightily to Spain’s economy. As one of Spain’s 17 autonomous regions, Catalonia enjoys ample rights but key areas such as infrastructure and taxes are in the hands of Madrid. Separatist Catalans have long complained of contributing too much to the state while not getting enough in return.

The regional government’s spokesman, Jordi Turull, on Sunday blamed the violence directly on Spanish Prime Minister Mariano Rajoy and senior officials. He said the actions of Spanish National Police and Civil Guard forces were politically motivated and showed “a clear motivation to harm citizens.”

Catalan foreign affairs chief Raul Romeva said they will ask the European Union to act against Spain for the police action.

Manuel Condeminas, a 48-year-old IT manager who tried to block police from driving away with ballot boxes on Sunday, said police had kicked him and others before using their batons and firing the rubber bullets.

Police move back to their vans followed by members of the public after storming into polling station to confiscate ballot boxes and ballots where the President Carles Puigdemunt will vote later today on October 1, 2017 in Sant Julia de Ramis, Spain. (David Ramos/Getty)

Elsewhere, Civil Guard officers, wearing helmets and carrying shields, used a hammer to break the glass of the front door and a lock cutter to break into the Sant Julia de Ramis sports center near the city of Girona. At least one woman was injured outside the building, wheeled away on a stretcher by paramedics.

Clashes broke out less than an hour after polls opened, and not long before Catalonia regional president Carles Puigdemont was expected to turn up to vote at the sports center. Polling station workers reacted peacefully and broke out into songs and chants challenging the officers’ presence.

Puigdemont was forced to vote in Cornella de Terri, near the northern city of Girona, his spokesman told The Associated Press.

Police had sealed off many voting centers in the hours before the vote to prevent their use. Others were filled with activists determined to hold their ground.

Spanish riot police forcefully removed a few hundred would-be voters from a polling station at a school in Barcelona. The scene was repeated at other locations, although voting was peaceful in some spots.

Daniel Riano, 54, was inside when the police pushed aside a large group gathered outside busted in the Estela school’s front door.

“We were waiting inside to vote when the National Police used force to enter, they used a mace to break in the glass door and they took everything,” he said. “One policeman put me in a headlock to drag me out while I was holding my wife’s hand! It was incredible. They didn’t give any warning.”

Joaquim Bosch, a 73-year-old retiree at Princep de Viana high school, was uneasy about a possible police response to the crowds.

“I have come to vote to defend the rights of my country, which is Catalonia,” Bosch said. “I vote because of the mistreatment of Catalonia by Spain for many years.”

Before dawn, reporters with The Associated Press saw ballot boxes wrapped in plastic bags being carried into some of the polling stations in Barcelona occupied by parents and activists. The plastic ballot boxes, bearing the seal of the Catalan regional government, were placed on tables, prompting cheers from hopeful voters who had gathered in schools before dawn.

Courts and police have been cracking down for days to halt the vote, confiscating 10 million paper ballots and arresting key officials involved in the preparations. On Saturday, Civil Guard agents dismantled the communications systems used to connect voting stations, count the votes and vote online. That prompted the Spanish government to announce that holding the referendum Sunday would be “impossible.”