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.

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.

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."

Posted!

A link has been posted to your Facebook feed.

People hold a giant Catalan Senyera flag as protesters begin to gather ahead of a pro-unity demonstration in Barcelona on Oct. 29, 2017. Pro-unity protesters were to gather in Catalonia's capital Barcelona, two days after lawmakers voted to split the wealthy region from Spain, plunging the country into an unprecedented political crisis. Pierre-Philippe Marcou, AFP/Getty Images

Protesters wave Spanish and Catalan Senyera flags during a pro-unity demonstration in Barcelona on Oct. 29, 2017. As many as one million Spaniards rallied in Catalonia's capital Barcelona, waving national and European flags and chanting "Viva Espana!" to denounce regional lawmakers' vote to sever the region from Spain. Lluis Gene, AFP/Getty Images

A woman shouts slogans during a protest called by the Societat Civil Catalana (lit: Catalan Civil Society) under the slogan 'We all are Catalonia" against the unilateral declaration of independence proclaimed on 27 October by the Catalan Parliament, in Barcelona, northeastern Spain on Oct. 29, 2017. Enric Fontcuberta, EPA-EFE

Pro-unity protesters were to gather in Catalonia's capital Barcelona, two days after lawmakers voted to split the wealthy region from Spain, plunging the country into an unprecedented political crisis. Pierre-Philippe Marcou, AFP/Getty Images

A demonstrator holds up a copy of the Spanish Constitution during a mass rally against Catalonia's declaration of independence, in Barcelona, Spain on Oct. 29, 2017. Thousands of opponents of independence for Catalonia held the rally on one of the city's main avenues after one of the country's most tumultuous days in decades. Santi Palacios, AP

Thousands of pro-unity protesters gather in Barcelona, two days after the Catalan parliament voted to split from Spainon Oct. 29, 2017 in Barcelona, Spain. The Spanish government has responded by imposing direct rule and dissolving the Catalan parliament. Jeff J Mitchell, Getty Images

Moroccan Rif activists wrap themselves in a Catalan flag during a demonstration outside the Palau Catalan Regional Government Building on Oct. 28, 2017 in Barcelona, Spain. The Spanish government stripped Catalonia of its autonomy following the Catalan parliament's vote yesterday to declare independence. Jeff J Mitchell, Getty Images

Nationalist activists hold Spanish flags as they drive around Barcelona, Spain, on Oct. 28, 2017. About 300 pro union activists drove through Barcelona center with cars and motorcycles and reached the port to show solidarity toward the Guardia Civil national police, based at the Barcelona harbor. Emilio Morenatti, AP

A man walks holding an independence flag in downtown Barcelona, on Oct. 28, 2017. Catalonia's ousted separatist president on Saturday called on Catalans to peacefully oppose Spain's imposition of direct rule in the region, in a veiled refusal to accept his Cabinet's dismissal as ordered by central authorities. Santi Palacios, AP

People celebrate after Catalonia's parliament voted to declare independence from Spain on Oct. 27, 2017 in Barcelona.
Catalonia's parliament voted to declare independence from Spain and proclaim a republic, just as Madrid is poised to impose direct rule on the region to stop it in its tracks. A motion declaring independence was approved with 70 votes in favor, 10 against and two abstentions, with Catalan opposition MPs walking out of the 135-seat chamber before the vote in protest at a declaration unlikely to be given official recognition. Pau Barrena, AFP/Getty Images

Spain's Prime Minister Mariano Rajoy (C), is applauded after a speech at the Senate in Madrid, Spain, Oct. 27, 2017. Rajoy has appealed to the country's Senate to grant special constitutional measures that would allow the central government to take control of Catalonia's autonomous powers to try to halt the region's independence bid. Paul White, AP

People hold Catalan pro-independence Estelada flags and Basque Country flags during a demonstration in the northern Spain Basque village of Beasain on Oct. 22, 2017, during a protest action organized by "Gure esku dago" (It's in our hands) association supporting the right for a referendum on self determination in Catalonia. Ander Gillenea, AFP/Getty Images

Joxe Bikuna, 82, center, holds a baton with a Basque flag next to people holding Catalan pro-independence Estelada flags and Basque Country flags as they take part in a human chain between villages in the northern Spain. Ander Gillenea, AFP/Getty Images

People hold flags reading "Democracy" and "Yes" as they take part in a human chain between villages in the northern Spain Basque village of Lazkao on Oct. 22, 2017, during a protest action organized by "Gure esku dago" (It's in our hands) association supporting the right for a referendum on self determination in Catalonia. Ander Gillenea, AFP/Getty Images

A woman walks past pieces of Catalan pro-independence graffiti Oct. 22, 2017, in Barcelona, Spain. The Spanish government is to take steps to suspend Catalonia's autonomy by triggering Article 155 after the Catalan leader Carles Puigdemont threatened to declare independence. Puigdemont has said Catalonia will not accept direct rule by the Spanish government. Jack Taylor, Getty Images

Protesters hold signs reading "Freedom for the two Jordis" during a march to protest against the National Court's decision to imprison civil society leaders, in Barcelona, Spain, on Oct. 21, 2017. The Spanish government moved decisively Saturday to use a previously untapped constitutional power so it can take control of Catalonia and derail the independence movement led by separatist politicians in the prosperous industrial region. Emilio Morenatti, AP

Catalan President Carles Puigdemont, centre, deputy president Oriol Junqueras, left, and Carme Forcadell, speaker of the house in the Catalan parliament, hold hands during a protest in Barcelona, Spain, on Oct. 21, 2017. Santi Palacios, AP

People strain to hear a statement by Catalan regional president Carles Puigdemont on their smartphones while they gather in front of the Palau de la Generalitat de Catalunya, the building that houses the Catalonian presidency in Barcelona, Spain, on Oct. 21, 2017. Sean Gallup, Getty Images

Protesters wave pro-independence Catalan Estelada flags during a demonstration in Barcelona on Oct. 21, 2017. Spain announced that it will move to dismiss Catalonia's separatist government and call fresh elections in the semi-autonomous region in a bid to stop its leaders from declaring independence. Pau Barrena, AFP/Getty Images

A protester holds sign reading "Freedom. We want you home" during a march to protest against the National Court's decision to imprison civil society leaders, in Barcelona, Spain, on Oct. 21, 2017. The Spanish government moved decisively Saturday to use a previously untapped constitutional power so it can take control of Catalonia and derail the independence movement led by separatist politicians in the prosperous industrial region. Santi Palacios, AP

Spanish Prime Minister Mariano Rajoy addresses a press conference after chairing the cabinet meeting held to pass the measures to apply Article 155 of the Spanish Constitution to deal with the actions of Catalan regional President Carles Puigdemont, at Moncloa Presidential Palace in Madrid, on Oct. 21, 2017. Juan Carlos Hidalgo, EPA-EFE

People clash with Spanish police officers outside the Ramon Llull polling station in Barcelona, Oct. 1, 2017 during a referendum on independence for Catalonia banned by Madrid. Fabio Bucciarelli, AFP/Getty Images

Spanish National riot policemen restrain a young woman during clashes between the people gathered outside the Ramon Llull school and police forces in Barcelona. Alberto Estevez, European Pressphoto Agency

Spanish National Police officers in plain clothes try to snatch a ballot box from polling station officials at the Ramon Llull school assigned to be a polling station by the Catalan government in Barcelona, Spain, early Oct. 1, 2017. Manu Brabo, AP

A woman votes at a school listed to be a polling station by the Catalan government in Barcelona, Spain, Oct. 1, 2017. The Spanish government and its security forces are trying to prevent voting in the independence referendum, which is backed by Catalan regional authorities. Santi Palacios, AP

Spanish National riot policemen form a security cordon around the Ramon Llull school in Barcelona, Catalonia, on Oct. 1, 2017. National Police officers and Civil guards have been deployed to different polling centers in Barcelona to prevent the people from entering and vote in the Catalan independence referendum, that has been banned by the Spanish Constitutional Court. The police action has provoked clashes between pro-independence people and the police forces. Alberto Estevez, European Pressphoto Agency

People hold up four fingers representing the four stripes of the Catalan flag while they wait to cast their referendum votes outside the Escola Industrial of Barcelona school on Oct. 1, 2017 in Barcelona, Spain. Chris McGrath, Getty Images

A man blocks a line of police trucks as they try to control the area as people wait to cast their ballot in the referendum vote at Escola Industrial of Barcelona school polling station on Oct. 1, 2017 in Barcelona, Spain. More than five million eligible Catalan voters are estimated to visit 2,315 polling stations today for Catalonia's referendum on independence from Spain. The Spanish government in Madrid has declared the vote illegal and undemocratic. (Photo by Chris McGrath/Getty Images) ORG XMIT: 775051505 ORIG FILE ID: 856220788 Chris McGrath, Getty Images

Firemen try to hold back Catalan pro-independence people as clashes take place with Spanish Civil guards at a polling center at Sant Julia de Ramis sports center in Girona, where the Catalan President, Carles Puigdemont, was initially to vote. Andreu Dalmau, European Pressphoto Agency

Pro-referendum supporters lock a gate to a polling station as members of the Spanish National Police arrived to control the area during voting at the Escola Industrial of Barcelona school polling station on Oct. 1, 2017 in Barcelona, Spain. Chris McGrath, Getty Images

Members of a family comfort each other after failing to vote in the referendum because of the Spanish police closing their polling station on Oct. 1 in Sant Julia de Ramis, Spain. David Ramos, Getty Images

Catalan people who were gathered outside the Ramon Llull school clash with Spanish National riot police during the '1-O Referendum' in Barcelona, Catalonia, on Oct. 1. National Police officers and Civil guards have been deployed in Barcelona to prevent the people from entering to the polling centers and vote in the Catalan independence referendum, that has been banned by the Spanish Constitutional Court. Alberto Estevez, EPA-EFE

Pro independence supporters carry a giant banner reading ''Yes'' as they wave "esteladas", or Catalan pro independence flags, during a rally in support of the Catalonia's secession referendum, in Bilbao, northern Spain, Saturday, Sept. 30, 2017. Catalonia's planned referendum on secession is due to be held Sunday by the pro-independence Catalan government but Spain's government calls the vote illegal, since it violates the constitution, and the country's Constitutional Court has ordered it suspended. (AP Photo/Alvaro Barrientos) ORG XMIT: AB110 Alvaro Barrientos, AP

People prepare to spend the night inside a school listed to be a polling station by the Catalan government in Barcelona, Spain, Sept. 30 2017. Catalan pro-referendum residents vowed Saturday to ignore a police ultimatum to leave the schools they are occupying to use in a vote seeking independence from Spain. Felipe Dana, AP

Supporters of an independence referendum in Catalonia arrive to spend the night at a designated polling station in a high school in Figueras in a bid to ensure the vote goes ahead, on September 30, 2017, on the eve of an independence vote that Madrid has banned and is trying hard to block. Cesar Manso, AFP/Getty Images

A man stands beside some tents outside a would-be polling station for tomorrow's referendum on delf-determination at the Gracia neighbourhood in Barcelona, on Sept. 30, 2017.
Police in Catalonia have sealed off 1,300 polling stations in the region as authorities move to stop an independence referendum which has been banned by Madrid from taking place, the central government said today. Josep Lago, AFP/Getty Images

Anti-separatist demonstrators hold Spanish flags as they take part in a protest in support of Spain's unity ahead of Sunday's Catalan referendum vote on Sept. 30, 2017 in Madrid, Spain. Pablo Blazquez Dominguez, Getty Images

Protestors hold Spanish flags during a demonstration against independence in Catalonia called by the xenophobic far-right party 'Platform for Catalonia' (PXC) in front of the Spanish National Police headquarters in Barcelona, on Sept. 30, 2017. Pau Barrena, AFP/Getty Images

University students hold a Catalan pro-independence flag during a demonstration against the position of the Spanish government on the referendum on self-determination in Catalonia during on Sept. 28, 2017 in Barcelona.
Thousands of students took to the streets of Barcelona as part of the "permanent mobilization" of the Catalan separatists, three days ahead of the referendum on independence banned by the Spanish government. Josep Lago, AFP/Getty Images

Catalan firefighters unfold a large "Love Democracy" banner with a ballot box at the Museum of History of Catalonia in Barcelona, Spain, Sept. 28, 2017. Spain's National Court plans to investigate possible sedition charges for demonstrators who took part in a massive protest against a police crackdown on preparations for an Oct. 1 referendum on the Catalonia region's independence. Manu Fernandez, AP

Students gather as they demonstrate against the position of the Spanish government to ban the self-determination referendum of Catalonia during a strike by university students on Sept. 28, 2017 in Barcelona, Spain. The Catalan government is keeping with its plan to hold a referendum, due to take place on Oct. 1, which has been deemed illegal by the Spanish government in Madrid. Dan Kitwood, Getty Images

Catalonian regional President Carles Puigdemont, center, takes part at a demonstration to support the celebration of the independence referendum on Oct. 1 at Palau, in Barcelona, Spain. Andreu Dalmau, European Pressphoto Agency

People take part at a demonstration called by Young Basque socialist parties to support the Catalonian independence referendum in Vitoria, Spain on Sept. 28, 2017. David Aguilar, European Pressphoto Agency

Thousands of students take part at a demonstration to support the celebration of the independence referendum on Oct. 1, 2017 at Universidad de Barcelona square in Barcelona, Spain, 28 Sept. 2017. Juan Carlos Cardenas, European Pressphoto Agency

Students gather as they demonstrate against the position of the Spanish government to ban the self-determination referendum of Catalonia during a demonstration on Sept. 28, 2017 in Barcelona, Spain. Dan Kitwood, Getty Images

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.

“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

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."

National Police officers and Civil guards have been deployed in Barcelona to prevent the people from entering to the polling centers and vote in the Catalan independence referendum, that has been banned by the Spanish Constitutional Court. The police action has provocked clashes between pro-independence people and the police forces.(Photo: Alberto Estevez, EPA-EFE)

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

Members of a family comfort each other after failing to vote in the referendum because of the Spanish police closing their polling station on Oct. 1 in Sant Julia de Ramis, Spain.(Photo: David Ramos, Getty Images)