In 2010 Spain’s Constitutional Court issued a landmark ruling that inadvertently laid the ground for Sunday’s independence referendum in Catalonia.

At issue was the 2006 Statute of Autonomy of Catalonia, a law passed by the legislature in the autonomous Spanish community, that was then approved by Spain’s parliament and later ratified in a referendum by Catalan voters. Almost immediately, the Popular Party, the center-right group that now governs the country, challenged the statute (parliament was then dominated by the Socialists) before the Constitutional Court.

The court, Spain’s highest body for matters related to the constitutionality of laws, deliberated for the next four years. And its June 28 decision, on the face of it at the time, seemed harmless enough: Of the statute’s 223 articles, the court struck down 14 and curtailed another 27. Among other things, the ruling struck down attempts to place the distinctive Catalan language above Spanish in the region; ruled as unconstitutional regional powers over courts and judges; and said: “The interpretation of the references to ‘Catalonia as a nation’ and to ‘the national reality of Catalonia’ in the preamble of the Statute of Autonomy of Catalonia have no legal effect.”

At the time, outside observers wondered why the court had taken so long to formulate a ruling seemed so anodyne. As the Economist noted: “For a decision that took four years to reach, the rewriting of Catalonia's controversial autonomy charter ordered by Spain's constitutional court on June 28th was surprisingly light-handed.” Famous last words.

The anger in Catalonia was immediate. There were massive protests against the decision, which was, in the words of Argelia Queralt Jiménez, a lecturer in constitutional law at the University of Barcelona, “understood as an act of contempt against the will of the Catalan people expressed by its Parliament and a referendum. From that moment, on each September 11, the National Day of Catalonia, thousands have taken to the street to claim their citizenship of this Autonomous Community and to demand at least a new revised autonomy or, even, independence.”

This is not to say that Catalans had previously never thought of themselves as separate from Spain, or different culturally. Catalonia had a centuries-long history of antipathy toward the Spanish monarchy, but in 1931 it was granted broad autonomy as Spain became a republic. That didn’t last long. The 1936-1939 Spanish Civil War saw much of the fighting—and literary romanticizing—centered on Catalonia, which was a Republican stronghold. General Francisco Franco’s victory ensured that Catalonia’s official autonomy remained short-lived. Franco’s death in 1975 changed some of that when Spain became a constitutional monarchy. A new 1978 national constitution granted Catalonia autonomy again. In subsequent years, Catalonia became Spain’s richest region, the Catalan language enjoyed a broad revival, and Barcelona, the regional capital, became a centerpiece of European culture and even hosted the 1992 Olympics. Cut to 2003, when José Luis Rodríguez Zapatero, the socialist prime minister, voted to approve the Statute of Catalonia if the measure passed the Catalan legislature. Which returns us to the Constitutional Court’s decision seven years later.

The court’s decision prompted Artur Mas, then the president of Catalonia, to declare that he would call for an independence referendum if his party won re-election with a sizable majority. It did—and the nonbinding vote (which had been made nonbinding after the Constitutional Court stepped in once again) that was held in November 2014 asked voters two questions: “1) Do you want Catalonia to become a State? And, if yes, 2) Do you want Catalonia to be an independent State?” About 80 percent said “yes” to both questions; turnout was estimated at between 37 and 41 percent—so, not high.

Mas was forced to step aside after elections in 2015, paving the way for Carles Puigdemont, the mayor of Girona, to take the helm of the region. Puigdemont, who had advocated for Catalan independence long before it was popular, vowed to carry out a binding independence vote. Those plans look like they will come to a head Sunday as Catalans are set to vote once again on whether to remain part of Spain. The Spanish government is staunchly opposed to the vote, which the Constitutional Court has ruled illegal, and has taken strong steps to stop it from going ahead. If Catalans succeed in voting—and even if they do, it’s all but certain turnout will be low given a crackdown being carried out by the government in Madrid—the issue of their future will once again be fraught. If Spain succeeds in effectively blocking the vote, the result will almost certainly be the same.