BERGA, Spain — A large Catalan independence flag hangs from the city hall of Berga, a town of 16,000 inhabitants in the foothills of the Pyrenees. Known as the Estelada, the red-and-yellow striped design with a single star is also visible on almost all the surrounding buildings in the medieval square of Sant Pere, reflecting the depth of feeling about Catalan nationalism in the town.

A few weeks ago, this flag briefly became the flashpoint for a confrontation between Madrid and Catalonia over the north-eastern region’s drive for independence from Spain.

Early on the morning of November 4, police arrested Berga’s mayor, Montserrat Venturós, at her home and took her to a nearby courtroom to appear before a judge. The 31-year-old was accused of violating electoral laws by flying the Estelada from the town hall during the campaigns ahead of last year’s Catalan regional election and the Spanish general election. Her arrest was specifically the consequence of her refusal to obey two earlier court summonses.

Nationalists in the region immediately seized on this as an example of the Spanish state repressing Catalan culture.

Throughout that November day, Venturós, of the leftist Popular Unity Candidacy (CUP), received messages of support from nationalists across the region. Among them was the Catalan premier, Carles Puigdemont, who tweeted his backing to her “and all the elected officials who suffer persecution for their ideals.” Improvised demonstrations were held in other towns and that same morning the separatist Catalan National Assembly (ANC) designed a poster with an illustration of Venturós’ face next to the words “You’ll never walk alone.” It went viral.

When the mayor emerged, defiant and tearful, from the courthouse, dozens of supporters had gathered to cheer her.

This was just one of many clashes between Catalan politicians and the Spanish judiciary in recent months. The spotlight of nationalist outrage has since moved elsewhere, but Venturós’ CUP remains the fiercest expression of Catalan separatism in mainstream politics. Despite its small size, this anti-capitalist party has become a crucial player in the separatist drive — and one which could ensure the project’s success or bring it crashing to the ground.

“Fifteen years ago, when we talked about independence, I remember at home my family would say, ‘That’s Utopia,’” Venturós tells POLITICO in her office. “Okay, it was utopian 15 years ago, but who would have believed back then that right now we would be talking about a genuine separation of the Catalan institutions and Catalan people from the Spanish state?”

The CUP is part of an eclectic front of secessionist parties that, following elections in September 2015, have been both governing Catalonia and pursuing a so-called “roadmap” towards independence. The other partner in the alliance is Junts pel Sí (Together for Yes), itself a coalition of the center-right Catalan European Democratic Party (PDECat) and the Catalan Republican Left (ERC).

These separatists treated last year’s regional election as a plebiscite on independence. When Junts pel Sí won that vote but fell short of a majority in the 135-seat Catalan parliament, the CUP lent its 10 seats as support, but without formally entering the government. Together, these parties claimed their parliamentary majority gave them a mandate to push unilaterally towards independence — although they only had 48 percent of the popular vote.

* * *

Berga is deep in the Catalan nationalist heartland, fertile ground for the CUP’s message. In last year’s regional election, pro-independence parties accounted for 77 percent of votes here, a figure that does not reflect the situation across the region, with polls showing Catalans to be divided down the middle on the issue.

Venturós, who is waiting to see if she must stand trial, says her decision to hang the flag during two election campaigns was a deliberate “act of disobedience.” She justifies it by pointing to a statement of intent approved by the separatist front in the regional parliament in November 2015, which declared that the independence process “will not be subordinate to the decisions of the Spanish state, in particular the Constitutional Court.”

“When things go badly, when the Spanish state fails Catalonia, [independence] becomes more imaginable for them’” — Enric Juliana, author and journalist

“At some point — and it’s going to be quite soon — we’re going to have to carry out a massive act of civil disobedience in defiance of the Spanish state in the face of a right that is being denied to us,” she says.

She is referring to the next major stop on the roadmap: a referendum on independence that the Catalan government is planning for the fall of 2017. It has invited the Spanish government of Mariano Rajoy to bless the vote, Scotland-style, but that is almost certain not to happen, meaning the referendum would be technically illegal. While its advocates insist that a referendum victory would trigger secession, Rajoy has deemed such a vote and the entire roadmap unlawful. “Without law there is no democracy,” he told the Senate in November.

“Catalans have an alarm inside them which says, ‘In case of emergency, break the glass,’” says the author and journalist Enric Juliana, who is from the region.

“When things go badly, when the Spanish state fails Catalonia, [independence] becomes more imaginable for them.”

In recent years, Spain’s economic crisis and the institutional problems that accompanied it, such as a torrent of corruption scandals and voters’ loss of faith in their elites, have set that alarm ringing.

* * *

The Catalan independence movement, Juliana explains, is far from homogenous. There are those who have long believed in the need for a separate state; then there are those who have converted to the cause because of tensions with the rest of Spain over recent years; and a third, more calculating stratum sees the threat of independence as leverage in squeezing concessions from Madrid.

While many in the Junts pel Sí coalition are in the second and third categories, the CUP is firmly in the first. “Independence, socialism and feminism” are their guiding ideals and, unusually for a Spanish party, they have imposed on themselves strict moralistic guidelines, including four-year caps on the tenures of their leaders and frugal salary limits (Venturós receives only €1,400 of the €2,700 she is entitled to each month).

The CUP is also determined not to give ground on its principles. After last year’s regional election, the party stood firm on a promise not to support the continuation of Artur Mas of Junts pel Sí as Catalan regional premier and figurehead of the secessionist project. His economic liberalism and the corruption scandals surrounding his PDECat party (then known as Convergència) jarred with the CUP’s austere anti-capitalism. A last-ditch accord in January allowed Puigdemont to replace Mas, thus keeping the separatist front alive.

But while privatizations, spending cuts and graft scandals distance the CUP from its secessionist allies, there is consensus on the grievances driving the independence movement.

“We need independence because Catalonia pays a lot to the Spanish state and we get very little back,” says Rosa Prat, a Berga local who is walking past the town hall. “Independence would mean keeping that money here in Catalonia and things would improve a lot.”

It’s a common argument, based on the fact that industry-heavy Catalonia is Spain’s wealthiest region. Nationalists claim they pay €15 billion more each year to the central government than they receive back in investment; Madrid puts this figure at €8 billion.

Separatists believe the shortfall is visible in infrastructure such as Catalonia’s erratic rail network and its health care system. But they point to a broader failure on the part of the Spanish state to understand their culture and language.

One recent example of this was in October, when the Constitutional Court rolled back a Catalan ban on bullfighting which was introduced five years earlier, on the grounds that the region could not unilaterally decide such matters.

* * *

As the Berga flag controversy showed, the courts have become a battleground for the conflict between Catalonia and Madrid. Nationalists point to a litany of areas where political initiatives taken by their own regional parliament have been reversed by magistrates in Madrid, while unionists see a rogue region overstepping its powers. The most contentious instance of this was in 2010, when the Constitutional Court struck down several articles of a new statute granting increased powers to Catalonia, despite the fact the document had been approved by Catalans in a referendum and by the Spanish Congress.

For many, Rajoy’s conservative Popular Party, whose legal appeal had led to the ruling, thus enshrined its reputation as “anti-Catalan.” The episode also undermined the faith of many Catalans in Spanish institutions.

As Rajoy has embarked on his second term as prime minister, he has shown signs of wanting to take a less rigid approach to Catalonia.

The judge Santiago Vidal is one of many Catalans who converted to the independence cause in the wake of the statute furor.

Since then, he has become a vocal and controversial figure in his own right. In 2015, he was suspended by the judiciary for having drawn up a draft constitution for an independent Catalan state. More recently, he has become a senator for ERC, the leftist partner in Junts pel Sí. He sees two potential problems for the independence movement: a failure to secure more than 50 percent support in the referendum being planned; and the “unpredictable character” of the CUP.

“From a democratic viewpoint, their role is unquestionable and legitimate,” Vidal tells POLITICO in his office in Madrid, a large independence flag hanging on the wall beside him. “But whether they are convenient and of practical help is quite another issue and the truth is, in many ways they don’t help.”

He worries the CUP’s radicalism might tarnish the independence movement’s image on the international stage. “And nor does it help internally,” he adds. “Because it creates extra obstacles to the already difficult conditions surrounding the development of the roadmap — the process — in a calm, consensual way.”

Tensions within the pro-independence front have become visible on several issues, most obviously the annual Catalan budget, where the CUP has been determined to prioritize social justice.

“Two things are happening in Catalonia at the same time,” says Juliana. “There’s the unrest and anger fueled by the economic crisis which feeds separatist feeling, but at the same time that feeds the internal tensions between the pro-independence parties.”

In recent weeks, as Rajoy has embarked on his second term as prime minister, he has shown signs of wanting to take a less rigid approach to Catalonia. He has made a handful of what look like conciliatory appointments, including deploying deputy prime minister Soraya Sáenz de Santamaría to lead his government’s management of the Catalan issue. She has pledged “maximum willingness to intensify negotiations” and has started meeting with senior separatists.

But the independence movement is wary of this apparent change of tack, especially given that Madrid’s previous toughness has been such an effective recruiting weapon. In La Vanguardia newspaper, columnist Francesc-Marc Álvaro described it as “a way of playing for time to see if separatist feeling dips.”

Such initiatives certainly don’t impress the CUP, which is struggling to maintain its purist principles while inching closer to achieving what once looked like no more than a utopian dream.