Pro-separatist Catalans have occupied several schools in Barcelona designated as a polling stations in a contested independence referendum, in a bid to ensure the vote goes ahead.
"I am going to sleep here, with my oldest son who is a student here," Gisela Losa, a mother of three, told AFP at the Reina Vionnant primary school in Barcelona's Gracia neighbourhood, where pro-independence sentiment runs high.
"There are at least four or five families who will come with their children, and certainly there will be more, tomorrow it is certain that there will be more of us."
Spain's education ministry warned in a statement that school directors in Catalonia "were not exempt from liability" if they helped to stage Sunday's referendum, which the central government deems illegal.
A court on Wednesday ordered police to prevent the use of public buildings or places "for the preparation and organisation" of the referendum in the wealthy northeastern region of Spain, which is home to 7.5 million people and is about the size of Belgium.
We need your consent to load this rte-player contentWe use rte-player to manage extra content that can set cookies on your device and collect data about your activity. Please review their details and accept them to load the content.Manage Preferences
But Jordi Sanchez, the president of the Catalan National Assembly, an influential pro-independence organisation, told AFP the court order "simply says that on Sunday these spaces can't be used for the referendum".
"We believe it is good that these spaces will remain open, that they not close," he added.
"This is a contribution so Sunday will be as normal a day as possible, people who want to vote... if they arrive at a polling station with its doors open, this helps."
Earlier today Catalan government spokesman Jordi Turull said there would be "2,315 polling stations all over the region" for Sunday's referendum, which Spain's central government has vowed to block.
Spanish police have for days been seizing electoral items such as ballot papers as they follow orders to stop the referendum from taking place, after courts ruled it unconstitutional.
Opinion polls show Catalans are split on the issue of independence, but a large majority want to vote in a legitimate referendum to settle the matter.
With its own language and customs, Catalonia already has significant powers over matters such as education and healthcare.
But Spain's economic worries, coupled with a resentment that the region pays more in taxes than it receives in investments and transfers from Madrid, have helped push the independence question to centre stage.