Catalonia was tense this weekend ahead of an independence referendum that has divided Spain. At the final rally, the Catalan president, Carles Puigdemont, said the region was only one step away from independence. “We’ve got this far and we have until Sunday to win,” he told the crowd on Friday evening. “We have overcome an authoritarian state who didn’t want us to get to this point and above all didn’t want us to get here peacefully. But everything they have done has made us stronger.”

Madrid has declared Sunday’s referendum unconstitutional and vowed to prevent it taking place. The referendum’s organisers have called for resistance to the Spanish government to be peaceful.

More than 160 of 2,315 schools earmarked as polling stations were occupied by independence protesters on Saturday in an attempt to prevent them being locked up to keep voters out. Police issued an ultimatum to the occupiers, many of them parents and children, instructing them to leave or face arrest. The Catalan national assembly has told people that if their polling station is shut they should form a queue at the door, holding their ballot papers in their hands.

The authorities have confiscated voting papers and ballot boxes, raided printers and newspapers accused of aiding the poll, shut down websites and blocked an app explaining how and where to vote. Police have occupied the Catalan data agency, blocked access to the census and are seeking to thwart communication between polling stations. The national data protection agency has warned anyone manning a polling station they face fines of up to €300,000 for breaking the data protection law.

Both the European Union and the United Nations have voiced concerns over the manner in which Mariano Rajoy’s Madrid government has sought to ensure the poll does not take place.

The clampdown began on 20 September when Guardia Civil officers raided Catalan government offices and arrested 14 senior officials in the regional government, sparking mass protests. The officials were released but Madrid ramped up the repression, stamping out attempts to organise the referendum and threatening to imprison more than 700 mayors if they tried to allow the vote.

About 18,000 Mossos d’Esquadra officers and 6,000 Policía Nacional and Guardia Civil members are on duty in the region this weekend, and a Spanish government spokesman said “unlimited reinforcements” were available. The regional police have pledged not to use force, but say that if the occupiers don’t leave schools quietly they will call in the Guardia Civil or the Policía Nacional, who will use force if necessary.

“Not just the future of Catalonia but the future of democracy in Europe is at stake, that’s why the world is watching,” said Jordi Sánchez, president of the Catalan national assembly, which organises the pro-independence rallies. He said that, given the obstacles, if a million managed to vote it would be counted as a success. That figure would be far fewer than the 2.3 million who voted in the unofficial referendum in November 2014 and would represent less than 20% of the Catalan electorate. If so few people vote, Puigdemont’s insistence that any majority for “yes” would count, whatever the level of participation, would ring hollow and stand little chance of being recognised by foreign governments or international institutions.

Facebook Twitter Pinterest Catalan regional police (Mossos d’Esquadra) arrive to the IES Tarradell school to notify its principal that the school must be closed, in Barcelona, northeastern Spain, 29 September 2017. Photograph: Biel Alino/EPA

The Catalan vice-president, Oriol Junqueras, said that however many people vote, Catalonia will have won the right to be respected and listened to: “It’s inevitable and obligatory the central government sits down to negotiate.” Madrid has said all along that it will negotiate on anything but a referendum. The Catalans offered to cancel the illegal referendum in return for the promise of a legal one. As tensions have mounted, Rajoy has said that Puigdemont and Junqueras are not fit negotiators and called for a fresh round of Catalan elections, the third in five years.

Sixty lawyers, 70 international observers and 25 psychologists will be on hand. Despite polls indicating that only a minority of Catalans favour independence, there has not been a “no” campaign, although pro-Spanish unity demonstrators were out in force in Barcelona on Saturday.

“This is a revolution born from political power and one that represents the most economically powerful Catalan classes,” said Alex Ramos, vice-president of the group Societat Catalana, which opposes independence. “It’s not coming from an oppressed people but from the higher classes.”

The left-wing Barcelona mayor Ada Colau, having said at the outset that the poll lacked the necessary guarantees and was not the referendum the Catalan people deserve, has half-heartedly endorsed the process. She and her supporters have nevetheless been labelled ‘‘traitors’’ by the CUP (Popular Unity Candidacy), the anti-capitalist party that has kept Puigdemont’s centre-right nationalists in power.

The tone is shrill and the bar for intelligent debate has been set low. Whatever happens, people will wake up on Sunday to a Catalonia that is more divided than ever and a Spain which, just over 40 years after the death of Franco, is experiencing a crisis of democracy.

Additional reporting by Sam Jones