Braden Phillips and Jabeen Bhatti

Special for USA TODAY

BARCELONA — Spanish riot police smashed into polling stations Sunday in the Catalonia region and wounded more than 800 people trying to vote on an independence referendum the government had banned as unconstitutional.

Violence erupted shortly after polls opened in northeastern Spain's autonomous Catalonia region, with video showing Spanish police firing rubber bullets, using batons and roughing up voters.

Spanish Prime Minister Mariano Rajoy, in a televised address after the polls closed, declared there was no independence vote and called the referendum an “attack on the rule of law.”

Rajoy also thanked the police for acting with “firmness and serenity.” The Spanish government in Madrid had opposed the referendum, and Spain's highest court earlier ruled to suspend the vote, but local authorities went ahead anyway.

“What the police are doing is simply savage,” said Jordi Turull, spokesman for the Catalan regional government, which backs independence. He said Spain has become “the shame of Europe” with its iron-fist tactics.

Catalonia’s health services said 844 people were injured, with two in serious condition. Spain’s Interior Ministry said 33 police officers were injured.

More:Catalonia vows to vote in face of Spain's tightening grip against independence

More:Catalonia independence vote: Why it's happening, and why it matters to U.S.

In a sign of protest against the Spanish government, Barcelona's soccer team — among the world's most prestigious teams — played their scheduled game against Las Palmas in an empty-100,000 seat stadium. The team issued a statement condemning efforts to keep voters from "exercising their democratic right to free expression." Barcelona won 3-0.

For weeks, Spain has warned that the vote is unconstitutional, and authorities detained some Catalan officials. The Spanish government ordered police to shut down voting centers and seized millions of ballots ahead of Sunday's vote.

Catalans pushed back. Over the weekend, people used tractors and other vehicles to block Spanish security from accessing the polling places, also removing doors so they couldn't be nailed closed or padlocked.

Polling stations across the region drew long lines before dawn, as voters said they were determined to be heard despite Spanish security forces in riot gear.

"I will vote in favor of independence. I've been in favor of it since I was a student," said Antoni Ruiz Cornellà, 46, an economist in Barcelona. "People here are not looking for violence, but I'm not sure that's the case with the Spanish side."

In an evening televised address, Catalan regional president Carles Puigdemont said Catalonia had “won the right to become an independent state.”

“Today the Spanish state wrote another shameful page in its history with Catalonia,” he said, adding that he would appeal to the European Union to look into alleged human rights violations during the vote.

Barcelona Mayor Ada Colau called on Rajoy, the prime minister, to resign after police were seen beating and kicking people trying to vote.

“Rajoy has been a coward, hiding behind the prosecutors and courts. Today he crossed all the red lines with the police actions against normal people, old people, families who were defending their fundamental rights,” she told TV3.

Spanish Foreign Minister Alfonso Dastis blamed the violence on Puigdemont and his regional government.

“If people insist in disregarding the law and doing something that has been consistently declared illegal and unconstitutional, law enforcement officers need to uphold the law,” Dastis said in an interview with the Associated Press

More:Catalonia independence vote: Why it's happening, and why it matters to U.S.

More:Leader of Catalonia separatist vote vows to press ahead for independence amid tensions

More:Catalonia vows to vote in face of Spain's tightening grip against independence

One of Spain’s two main two labor unions, the CCOO, called for a general strike in Catalonia on Tuesday to protest the police violence. The union also called for protests Monday at noon in front of town halls across Catalonia.

The most recent polls showed a split over independence, in part because it's unclear what relationship Catalonia would have with the EU or Spain itself.

Catalonia is one of Spain's 17 semi-autonomous regions. Barcelona, the Catalan capital and home to 7.5 million people, contributes disproportionately to Spain's national coffers. It accounts for about one-fifth of the Spain's economy and 30% of foreign trade.

Maria Rosa Vergès, 57, a restaurant owner in Sant Pol de Mar, a coastal town north of Barcelona, said she was voting on behalf of her grandparents, who struggled under Spain's longtime military dictator Francisco Franco, who died in 1975. She said Spain had no right to deny Catalans their vote.

"I'm voting yes. I've been in favor of independence for a long time," she said. "Maybe we won't achieve independence this time, but it's coming."

Elisabet Maragall, 46, a travel agency owner, said more people than ever are feeling disconnected from Spain.

"I have nothing against Spain, it's a marvelous country," she said. "But we hear people calling us anti-democratic, terrorists, Nazis. There's nothing worse than ignorance. We've had enough. We're thinking about the future of Catalonia, not Spain."

At one polling station, two lines formed of at least 1,000 people, both going halfway around the block in opposite directions. The police appeared at 11 a.m., parking vans at the intersections on both ends of the street, while some voters faced off with them and others blocked the entrance chanting, “We are a peaceful people.”

The crowd chanted, “Stay away, stay away,” “Democracy, democracy,” and “We will vote,” while singing the Catalan national anthem, Els Segadors (The Reapers).

The police left around noon, provoking a roar of approval and applause.

When the doors opened, older people voted first. Each time they exited, the crowd erupted in applause. Until the police arrived, the atmosphere was celebratory.

“We clap for the old people because it’s harder for them and they still came out, but also because they lived through Franco’s oppression and it means a lot symbolically,” said Joan Comas Fernandez, 49, who works in real estate in Barcelona.

Comas came with his family at 5 a.m. to protect the polling station from the police, who said they would arrive at 6 a.m. The family brought coffee, breakfast and a dozen carnations to give to the police.

“The carnations are our weapons,” Fernandez said.

Bhatti reported from Paris