BARCELONA, Spain (AP) — Police in Catalonia issued an ultimatum Saturday: the separatists, parents and children who are occupying schools to use them as polling stations for a disputed referendum on the region's independence from Spain must leave by dawn.

The police deadline of 6 a.m. 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 calls 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.

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 Saturday 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.

Prime Minister Mariano Rajoy's conservative government says any vote on Catalan secession would have to be held across all of Spain, not just in Catalonia. The European Union has said that 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 keep police from them shutting down.

A top Spanish security official in Catalonia says police 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 northeastern region, said parents and students were found to be occupying 163 schools when police were sealing off facilities on Saturday.

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 9 a.m.

Millo says anyone remaining in schools after 6 a.m. will need to be removed in line with a judge's orders, but predicts there won't 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," Roy 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."

Organizers 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 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?" Roy 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 places — 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 ballots to the polling stations to carry out a credible test of regional sentiment. Police have already confiscated 10 million paper ballots in the last few days.

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

"They will appear," he said with a shrug.

In Madrid, thousands of people rallied Saturday in a central plaza to protest 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 favors breaking away from Spain, is among those promoting the independence vote.

Giles reported from Madrid. Aritz Parra contributed from Barcelona.

Follow complete AP coverage of the Catalonia referendum here .