Political action in Spain turned violent on Oct. 1, when a referendum vote on Catalonia's independence from Spain ended with hundreds injured. Spanish riot police closed down polling centers where voters were lined up to weigh in on the referendum, allegedly roughing up voters and confiscating ballot boxes. The stunning scenes are leaving many wondering: what is going on in Spain?

The vote on whether the region of Catalonia, in the northeast of Spain, should be an independent country was controversial from its start. For days leading up to the vote, the national government tried to suppress the vote organized by Catalonia's regional government, declaring that it was illegal per the country's 1978 constitution. The violence on Sunday, the day of the scheduled vote, was the national government's last-ditch effort to stop the vote from going ahead. As of 3:30 p.m. ET, a reported 761 people have been injured in the violence, according to The Guardian, with more than 300 of them in the regional capital of Barcelona.

But why did it get so out of control? Here's what you need to know to understand what happened in Spain today.

Catalonia is a wealthy, and culturally unique, region in the northeast Spain.

One of Catalonia's biggest reasons for independence is economic — they think they contribute more to Spain than they get back. The region of around 7.5 million provides almost one-fifth of the nation's economic output, according to Marketplace, at about 226 billion euros. Though the region represents around 16 percent of the national population, they contribute 20 percent of taxes, and get back 14 percent. In fact, it looks like Spain needs Catalonia a lot more than Catalonia needs Spain: the region's GDP is comparable to that of Denmark, so it could definitely survive on its own.

Also a factor? Catalonia has a culture and language distinct from the rest of Spain. Many Catalans speak the local language of Catalan, and not Spanish, as their native tongue. The region also has a history of enthusiasm for autonomy and independence, which contributed to a pushback against Spanish oversight after a 2010 ruling from Spain's Constitutional Court which set limits on the region's claims to sovereignty, per the BBC.

This isn't the first time that Catalonia has pushed for independence.

In 2014, the regional government held a non-binding vote on independence, in which 80% of those who participated voted to break away, according to the BBC. A more recent poll just a few months before October's referendum showed that just over 41 percent of Catalans wanted independence.

And earlier in September, Catalonia's regional parliament passed a so-called referendum law, in order to allow for the vote, per The Guardian. The regional government has said that the referendum will be legally binding, and that if a “yes” vote wins, the region will declare independence within 48 hours.

But Spain says it's not allowed.

The Spanish government says that the referendum is illegal, because the country's constitution doesn't allow for a vote on self-determination. The nation's Constitutional Court suspended the regional government's referendum law, and is looking into whether it breaches the constitution.

And on Oct. 1, it fulfilled those promises.

As voters lined up to weigh in on the referendum, Spanish riot police acting on orders from the government pushed into polling places to stop the voting, firing rubber bullets and confiscating ballot boxes, The Associated Press reported. Witnesses told The Guardian that police used axes to bash down the doors of polling places.

And videos on social media showed violent clashes between police and those trying to vote.

So what's happening now?

Prime Minister Rajoy said in a press conference on Sunday that no referendum on self-determination had taken place, according to The Guardian. “Today there has not been a self-determination referendum in Catalonia," Rajoy stated. "The rule of law remains in force with all its strength.”

He also said that the majority of Catalans did not want to participate in the referendum, though polling showed that 70% of people in the region wanted the vote.

The speech, broadcast publicly in Barcelona, was met with derision and boos.

Due to the police disruption, it's hard to say both how many of Catalonia's more than 5 million voters turned out or were able to vote, much less what the final result was. But Catalonia's regional president, Carles Puigdemont, said in a speech on Sunday that citizens of Catalonia have "earned the right to have an independent state” and to make the decision unilaterally. He said that the votes would be sent to the parliament to proceed.

Puigdemont also slammed the Spanish government for their response to the vote. "The Spanish government has today written a shameful page in its relationship with Catalonia," he said.

European and international leaders also criticized Rajoy's handling of the situation, with many saying that they condemned the violence. Belgian Prime Minister Charles Michel said, "violence can never be the answer! We condemn all forms of violence and reaffirm our call for political dialogue." And the European parliament's Brexit chief, Guy Verhofstadt, said that while he didn't want to interfere with Spain's domestic affairs, he "absolutely condemn[ed] what happened today in Catalonia."