Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Spanish police sealed off buildings Saturday in a bid to prevent the government of Catalonia holding a banned referendum on independence from Madrid.

Supporters of Sunday’s poll spent the night in schools that are earmarked as polling stations and pledged to remain there until Sunday to keep them open. However, a Spanish official said more than half the sites had been closed off.

The ballot has no legal status, as it has been blocked by Spain's Constitutional Court and Madrid for being at odds with the 1978 constitution, but tens of thousands of voters were still expected to take part.

The issue is now one of the biggest political challenges to face Spain since the end of Gen. Francisco Franco's dictatorship in 1975. Here’s what the conflict is about and why it matters.

What is Catalonia?

Catalonia, in northeast Spain, is one of the country’s powerhouses, making up around a fifth of Spain’s economy. The region with a population of 7.5 million has a distinct language and culture, which were suppressed under Franco, a conservative monarchist whose regime dominated Spain for four decades.

"Two nationalisms are confronting each other — the Catalan versus the Spanish."

Its regional government already enjoys considerable freedom, running its own police and exercising much control over health and education. Still, taxes, foreign affairs, defense, ports, airports and trains are in the hands of Spain's government in Madrid.

Catalonia has maintained a distinct identity for centuries, but the drive for independence gathered force in 2010 after Spain’s Constitutional Court struck down key parts of a charter that would have given the region greater autonomy and crucially recognized it as a nation within Spain.

Since then, hundreds of thousands of Catalans have taken to the streets on Sept. 11 — a Catalan holiday — and demanded independence.

Map shows Catalonia and Spain. Google Maps

Do most Catalans want independence?

Recent polls show that just under half of the region’s inhabitants support independence, but over 80 percent want to vote on the matter.

“There has always been nationalism in Catalonia but until the 2010 Constitutional Court decision there was nationalism largely without ‘indepentism,’” said Ramon Maiz, a professor of political science at the University of Santiago de Compostela, and an authority on nationalistic movements.

Dissatisfaction with the central government also gained momentum as a result of the 2008-13 economic crisis that saw skyrocketing unemployment, harsh austerity measures and exposed what many saw as cronyism among top government and financial officials.

This weekend’s vote isn’t the first attempt of its kind.

In 2014, Catalonia tried to hold a nonbinding poll but was blocked by the Constitutional Court. This was followed by an unofficial poll where some 2.3 million Catalans voted, with 80 percent leaning toward independence.

In 2015, regional elections produced a slim majority of pro-independence lawmakers.

Has the dispute gotten ugly?

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Yes.

To begin with, the two sides are hardly talking. Meanwhile, Madrid has made unprecedented efforts to quash the referendum, seizing paper ballots and ordering schools to be sealed off so they can't be used as voting stations.

Senior regional officials have been arrested, government offices raided and referendum websites blocked in the drive to shut down the vote. Around 4,000 police from other parts of Spain have been deployed to Catalonia, joining 5,000 state police based in the region and 17,000 local police, or Mossos d'Esquadra, according to Reuters.

The Mossos' loyalty has been torn between the central and regional governments. Catalan officials have insisted that the force will take orders from local authorities.

Catalan police scuffle with protesters during a demonstration supporting Catalonia's independence referendum on Sept. 19. Manu Fernandez / AP

On Monday, Spain’s attorney general even refused to rule out possibly detaining Carles Puigdemont, the head of Catalonia’s pro-independence government. Spain's National Court has also said it planned to investigate possible sedition charges for demonstrators who participated in a massive protest last week against the police crackdown.

“The reason the [Spanish] government has responded is that there has been a completely illegal process," said Maiz. "You would expect if a region anywhere in the world, whether it is Texas or Hamburg, tries to become independent, the central government will take steps to prevent this."

On Saturday, Spain's foreign minister Alfonso Dastis told the AP that the poll was "a mockery of democracy, a travesty of democracy."

While no country has openly expressed support for the referendum — President Donald Trump has said he thought it would be "foolish" for Catalans to break away — Madrid’s crackdowns have sparked international alarm.

The Scottish Parliament — which notably is dominated by a party that has called for the region’s independence from the U.K. — on Sept. 22 sent a letter to the Rajoy government expressing its “grave concern over the escalating actions of the Spanish state in Catalonia.”

Pro-referendum demonstrators display a placard reading "Democracy" on a wall during a demonstration outside Barcelona's university. Josep Lago / AFP - Getty Images

“The Spanish government claim to be acting in defense of democracy but threats of legal action against hundreds of democratically elected representative and repressive acts against an elected government, media organizations and citizens are in no way democratic acts,” according to the letter signed by politicians from several parties. “The recent arrest of a Catalan government director general and a number of government staff was a particular violation of the norms of European democracy.”

Pro-independence forces have also come under criticism.

Media watchdog Reporters Without Borders said Thursday that pressure by the Catalan government and social media harassment by pro-independence movement "hooligans " have created a suffocating atmosphere for journalists trying to cover the referendum.

The report said the regional government's drive to impose its side of the story in local, Spanish and international media has "crossed the red lines."

Has the Catalan government backed down?

No.

Far from dampening enthusiasm for the vote, Madrid’s moves have sparked mass demonstrations and it would be fair to say that the regional government is in open revolt.

“There has been no dialogue [with the Catalan movement], and the federal government is feeding the fire by taking judicial measures and political measures,” said Maiz.

Catalan regional leader Carles Puigdemont during a rally near Barcelona. Andreu Dalmau / EPA

Catalan pro-independence lawmakers have also vowed that the region’s assembly would declare independence within 48 hours of a "yes," regardless of turnout.

Puigdemont, the head of the regional government, has tweeted “We will not accept the darkest times,” an apparent reference to the repression under Franco. He added: “The [Catalan] government is in favor of liberty and democracy.”

On Wednesday, Puigdemont described the crackdown as “apocalyptic,” telling The Associated Press, "Today we are closer to a massive (turnout for the) referendum than we were one month ago."

What could happen on Sunday?

The pro-independence forces are vowing that the vote will go ahead in spite of efforts by Madrid to block it — in many cases literally. They have said voters should form long lines if they found police guarding polling stations as concerns grow that frustration could erupt into street unrest.

"Peaceful resistance, zero violence ... If you can't access the voting stations, by no means should you respond with violence," the Catalan National Assembly (ANC) said in an internal document distributed to members Thursday. "Above all, bear in mind this is not a demonstration but a giant line. The picture of millions of people lining up with a ballot paper in their hand will be more impressive."

The biggest risk of disturbance may lie with foreign anarchist groups, which local newspapers said had arrived in Barcelona.

What could happen in the aftermath?

Catalonia and Spain stand to suffer economically if the region were to breakaway without an agreement. But Catalonia may have a harder time going it alone without support from outside of Spain.

The European Union, which has reason to be afraid of fueling other regional nationalist movements, says Catalonia would have to reapply for membership to the grouping, something that Spain could block.

And it is virtually impossible to estimate the political impact the move would have. Catalonia has the largest economy of the Spanish regions — greater than Greece's and close to those of Ireland and Denmark. But many of its goods come from the Spanish state, while Spain relies on Catalonia's industrial products and export facilities.

People wave Spanish flags as they gather at Barcelona's port bringing food and drinks to Spanish National Police and Guardia Civil officers, who are housed on charter ferries, on Sept. 24. Lluis Gene / AFP - Getty Images

No matter what happens next, there will be huge disruption unless there is a concerted effort at dialogue on both sides, said Maiz.

“There will be great fracturing within Catalonia — already the pressure is almost intolerable — and an internal rupture of society,” he said, adding that the tensions looked set to escalate across the country.

He added: "Two nationalisms are confronting each other — the Catalan versus the Spanish — two national discourses that are exclusive of each other.”