As he wrapped up his campaign late Friday

Catalan separatists showed determination Saturday to press ahead with an independence referendum banned by Madrid, occupying dozens of schools designated as polling stations to stop police from closing them down.

"In these hugely intense and hugely emotional moments, we sense that what we once thought was only a dream is within reach," Catalan leader Carles Puigdemont told a crowd of cheering supporters on Friday evening, as he wrapped up his campaign. 

Over in the town of L'Hospitalet de Llobregat, though, a different scene played out in a large conference hall.

There, some 2,000 people who oppose separating from Spain rallied at a meeting called by Ciudadanos, Catalonia's main opposition party.

The vote has stoked passions in the wealthy northeastern region, pitting Catalan leaders against the central government in one of the biggest crises to hit Spain since democracy was restored after the death of dictator Francisco Franco in 1975.

It has also sown divisions among Catalans themselves, with the region deeply split on independence, even if a large majority want to be allowed to settle the matter in a legal vote.

"There is nothing that justifies violating so basic a right as the right to vote," said Omar Sanchis, a 29-year-old drama student, standing behind the railings of the Collaso i Gil school in Barcelona which he and others had occupied.

Authorities in Madrid have instructed police to ensure no votes are cast in a referendum that the courts have ruled unconstitutional.

For days, they have been seizing electoral items such as ballot papers while prosecutors have ordered the closure of websites linked to the vote and the detention of key members of the team organising the referendum.

A court on Wednesday ordered police to prevent the use of public buildings "for the preparation and organisation" of the referendum.

- Farmers and firefighters -

But those for the vote have mobilised.

On Friday, tractors paraded through Barcelona, some decked with the "Estelada", the separatists' flag of red-and-yellow stripes with a white star on a blue chevron.

They and firefighters have vowed to protect polling stations.

As classes ended for the day, small groups of activists, including parents with their children, decided to peacefully occupy several schools in Barcelona where voting is scheduled to take place.

"I'm going to sleep here with my eldest son," said Gisela Losa, a mother of three who was among a group of parents who had taken over the Reina Violant primary school in Barcelona's Gracia neighbourhood. 

From district to district, people were gathering to form "Committees to protect the referendum", using the Telegram messaging app to get organised and urging everyone to remain peaceful, said an AFP correspondent who saw some of the messages. 

The move appeared to be partly coordinated by a platform of "schools open for the referendum."

By midnight, it was still unclear exactly how many schools were occupied, but organisers said dozens had been taken over in Barcelona.

There were believed to be a lot more in the city and around the region, with the sit-ins expected to continue throughout the weekend.

Over at the anti-independence rally, Dolores Molero, a 53-year-old secretary from Tarragona, a city further south, said the situation was "a dead end".

"They want to destroy the state, Spain and Catalonia," she said after a meeting that saw people waving both Spanish and EU flags, as well as the "Senyera" -- the official Catalan flag of plain red-and-yellow stripes.

- Risk of 'disruption' -

Madrid has repeatedly warned those who help stage the referendum that they face repercussions.

On Friday, Spain's education ministry said in a statement that head teachers in Catalonia "were not exempt from liability" if they cooperated.

But Jordi Sanchez, the president of the Catalan National Assembly, an influential pro-independence organisation, told AFP the court order said public spaces could not be used for the referendum on Sunday "but it did not say anything about leisure activities today and Saturday".

"We have proposed that citizens organise activities, that they put in place a lot of activities to give life to these spaces which on Sunday should host the referendum."

Barcelona's Joan Brossa high school, for instance, advertised a series of activities for Friday and Saturday, including film screenings, football matches and Zumba dance fitness classes.

Catalan government spokesman Jordi Turull said there would be "2,315 polling stations all over the region" for the vote.

Catalonia's regional police force, the Mossos d'Esquadra, has also warned about the risk of "disruption of public order" if efforts are made to prevent people from casting ballots.

Madrid has sent thousands of extra police officers from other forces to Catalonia -- which accounts for one fifth of Spain's economy -- to stop the referendum from happening.

Molero said she was worried about what would happen on Sunday.

"We'll have to be cautious. I won't go out," she said.