Police in Catalonia have issued an ultimatum to the separatists, parents and children who are occupying schools to be used as polling stations for a disputed referendum on the region’s independence from Spain – they must leave by dawn.

The police deadline of 6am on Sunday is designed to prevent the vote from taking place, since the polls are supposed to open three hours later.

Spain’s Constitutional Court suspended the independence vote more than three weeks ago and the national government has called it illegal. Police have been ordered to stop ballots from being cast on Sunday and have been cracking down for days, confiscating ballots and posters.

(AP)Thousands cheer and wave esteleda, or Catalonia independence flags, during the ‘Yes’ vote closing campaign in Barcelona (AP)

Catalonia’s defiant regional government is pressing ahead despite the ban and the police crackdown, urging the region’s 5.3 million registered voters to make their voices heard.

Spain’s foreign minister said on Saturday that the Catalan government’s plan is anti-democratic and runs “counter to the goals and ideals the European Union” is trying to advance.

“What they are pushing is not democracy. It is a mockery of democracy, a travesty of democracy,” Minister Alfonso Dastis told the Associated Press.

Emotions are running high as the vote nears.

(AP)With ‘esteladas’, the pro-independence Catalan flag, on their backs, youngsters attend a closing campaign rally for the ‘Yes’ vote (AP)

Prime Minister Mariano Rajoy’s conservative government has said any vote on Catalan secession would have to be held across all of Spain, not just in Catalonia. The European Union said Catalonia would be forced out of the bloc and have to reapply to join if it leaves Spain, an EU member.

Parents supporting the referendum are camping out over the weekend at schools that are among the 2,315 designated voting facilities to stop police shutting them down.

A top Spanish security official in Catalonia said officers have already sealed off more than half of the 2,315 polling stations and disabled software that was to have been used in the referendum.

Enric Millo, the highest-ranking Spanish official in the north-eastern region, said parents and students were found to be occupying 163 schools when police were sealing off facilities on Saturday.

(AP)A man steers his ‘yes’ tractor during a protest by farmers in Barcelona (AP)

The regional police force has been ordered not to use force, but to vacate the schools three hours before the scheduled opening of polls at 9am.

Mr Millo said anyone remaining in schools after 6am will need to be removed in line with a judge’s orders, but predicts there will not be significant problems.

“I trust in the common sense of Catalans and that people will operate with prudence,” he said.

Quim Roy, a father of two daughters, said police told the few dozen parents and children at the Congres-Indians primary school in Barcelona on Saturday morning about the deadline and warned them not to display any pro-independence material.

“The only thing that is clear to me is that I won’t use violence,” he said. “If they tell me I can’t be in a public school to exercise my democratic rights, they will have to take me out of here. I won’t resist, but they will have to carry me out.”

People walk by leaflets of the People walk by leaflets of the “Yes” vote campaign on the ground in Barcelona (Bob Edme)

Organisers have set up a range of activities in the schools to keep spirits high as the historic confrontation with Spain’s central government unfolds, including yoga sessions, games, film screenings and picnics. But Mr Roy said many parents have decided to send their children home on Saturday night out of concerns for their safety.

“We decided in a meeting that we would send the kids home. Calling them human shields is a huge lie, but I made my decision because there is fear. Who knows what will happen if the Guardia Civil comes?” he said, referring to the Spanish national police force, which has been ordered to stop the vote.

He hopes at least a few dozen parents will hold a vigil to keep the school occupied and make it much more difficult for the authorities to shut down.

How Catalonia’s 17,000 regional officers respond to their orders – and whether they can clear all the polling stations – could be key to the success or failure of the referendum.

It is not clear whether the Catalan government can distribute enough ballot boxes and papers to carry out a credible test of regional sentiment. Police have already confiscated 10 million voting slips in the last few days.

Police block the entrance of the city hall as protesters wave Spanish national flags in the central Cibeles square in MadridPolice block the entrance of the city hall as protesters wave Spanish national flags in the central Cibeles square in Madrid (Paul White/AP)

Mr Roy said there were no ballot boxes or papers at Congres-Indians primary school yet but he was not bothered by that.

“They will appear,” he said with a shrug.

In Madrid, thousands of people rallied in a central plaza on Saturday to protest over the Catalan independence vote, angry that it could divide Spain. Some shouted “Long live Spain!” and “Puigdemont to jail!”

Catalan regional President Carles Puigdemont, who openly favours breaking away from Spain, is among those promoting the independence vote.