At a school in Badalona, north of Barcelona, referendum staff showed each other videos of police brutality at other polling stations. In one, a Spanish policeman clearly used some steps to jump on top of a voter. “Today,” declared Oriol, a pro-independence volunteer, “they lost Catalonia.”

By “they”, he meant Spain, whose police clashed yesterday with Catalans across the autonomous community. In Badalona, however, everything was peaceful and orderly. By noon, it was the busiest polling station I’d ever seen, and despite the rain, the atmosphere was upbeat. One lady left making a double “V” sign, beaming with pride.

And although “unofficial”, the referendum was clearly being carefully administered, each voter cross-checked on an electronic database (functioning despite Madrid’s attempts to take it offline). They were also prepared should the Spanish police attempt to confiscate the ballots. “If police came here and take the boxes,” said one official, “we will lose our votes.”

Outside, a lone Catalan policeman was benignly observing events, while elsewhere in the capital his Spanish counterparts were firing rubber bullets into crowds and physically assaulting voters, images watched by passengers on the Barcelona Metro. Elsewhere in the city, however, it was easy to forget anything was happening. Apart from the buzz of police helicopters overhead, it could have been any European city in early autumn.

READ MORE: Scots observers describe "simply horrendous" scenes in Catalonia as hundreds injured in police attack

On Saturday evening, I’d got caught up in a large pro-Spain demonstration which gathered outside a Catalan government building in the Gothic Quarter. No longer the “silent majority”, hundreds of people, young and old, draped in the Spanish flag, chanted: “Separatism is totalitarianism”, “we are Catalans and Spanish” and, in an echo of last year’s US elections, “Puigdemont, go to prison”.

These Spanish “Unionists” (a word that’s recently entered the Catalan lexicon) met with no obvious hostility from nearby shopkeepers. But then, as in Scotland, Catalonia is split between “independistas” and those who want to remain part of Spain.

“I think it’s better for everyone if Catalonia remains with Spain,” said Alex, a trainee pilot originally from Romania. “And that’s my friends’ opinion too,” he added carefully, “the ones who are from here.” Ben, a visitor from Valencia, believed “independence might be difficult, but the decision is in the hands of the people, so let them vote”.

“I’m personally against the referendum,” a writer called Marcos told me, “but I support the Catalans’ right to express their view.” He also reckoned Catalans were “being too selfish”. “A lot of people from my generation and younger are voting Yes”, he said, “without really having researched the consequences of what it actually means.”

As with any debate about secession, there is no single motivation that drives support. Until seven years ago, between 15-20 per cent supported independence, those for whom the community’s distinct history and culture was reason enough. The first key moment came in 2010, when Spain’s constitutional court struck down a Catalan statute – backed by several democratic mandates – extending the community’s autonomy. Many Catalans felt under attack, politically and culturally.

READ MORE: Scots observers describe "simply horrendous" scenes in Catalonia as hundreds injured in police attack

Then came the economic crisis, which drew into sharp focus Catalonia’s wealth relative to the rest of Spain. Statistics suggest a sort of reverse-GERS, the gap between what Catalans pay in taxes and what they get back in public services in the region of €8bn-10bn a year. Then came Madrid’s response to calls for an referendum. “The biggest machine of independence are not the arguments themselves,” observes Andrés da Silva, an activist with the centre-right but pro-independence PDeCAT, “but the Spanish government and [Prime Minister] Rajoy’s actions.”

Three years ago I attended Barcelona’s Diada and was struck at the large images of then UK prime minister David Cameron, whom supporters of independence view much more positively than his fellow conservative Mariano Rajoy. “At least the UK government has offered concessions to Scotland,” Oriol told me in Badalona, “we’ve had nothing from Madrid.” On Saturday, Spain’s finance minister suggested negotiating a Basque-style fiscal settlement with Catalonia, but it had little impact.

Andrés da Silva says many of his friends, hitherto opposed to independence, have changed their minds because of “all this repression”. At the same time, he’s realistic about the outcome, acutely aware pro-independence parties only managed 48 per cent of the vote at the most recent Catalan elections. If yesterday’s vote fails to produce a majority Yes vote or less than a 50 per cent turnout, he and others expect Catalan President Puigdemont to resign and a snap election to be called.

It’s an uncomfortable truth that “Catalanophobia”, as da Silva calls it, plays well in other parts of Spain, and within the governing People’s Party, members of which believe Rajoy is “too soft” when it comes Catalonia. But yesterday’s clashes were far from soft, they were brutal, so much so it could backfire and weaken – rather than strengthen – Rajoy’s position.

READ MORE: Scots observers describe "simply horrendous" scenes in Catalonia as hundreds injured in police attack

Legitimacy is key. Yes, the referendum is illegal under Spanish constitutional law and thus the outcome will lack legitimacy in Spain and beyond, but by its actions Madrid has also lost legitimacy, ordering its police to beat voters instead of compromising. It feels, therefore, like another decisive moment, after which any concessions – even federalism or further autonomy – will feel inadequate.

In a famous 1932 speech, the philosopher José Ortega y Gasset argued that for Spain, Catalonia was a problem “that cannot be resolved”, it could “only be steered along”. After a day of violence surrounding that most peaceful of activities – voting – it looks to this observer as if Madrid is helping steer Catalonia towards eventual independence.