Crowds have formed outside polling stations in Catalonia ahead of an independence referendum banned by the Spanish government.
Regional officials said ballot boxes were ready and predicted a big turnout.
Madrid has pledged to stop the vote and dozens of national police vehicles have left their base in the port of the regional capital, Barcelona.
Overnight, thousands of separatist supporters occupied the schools that were to be used as voting centres.
Police say they will be evicted.
Referendum organisers had urged voters to turn up “to defend” the polling stations at 05:00 (03:00 GMT) and to wait for voting to start at 09:00. They called for peaceful resistance to any police action.
Why these are uncharted waters for Spain
Spain’s move to halt Catalan vote
In some areas, farmers positioned tractors on roads and in front of polling station doors, Spanish media reported, and school gates were taken away to make it harder for the authorities to seal buildings off.
“I have got up early because my country needs me,” said Eulalia Espinal I Tarro, 65, who was outside a Barcelona school.
“We don’t know what is going to happen but we have to be here.”
Sunday would be an “important date for democracy”, regional Vice-President Oriol Junqueras told TV3, the main Catalan public channel.
On the eve of the vote, thousands of demonstrators calling for Spanish unity held rallies in cities across Spain, including in the Catalan capital Barcelona.
They waved Spanish flags and carried banners reading “Catalonia is Spain”.
What is the status of the vote?
The ballot papers contain just one question: “Do you want Catalonia to become an independent state in the form of a republic?” There are two boxes: Yes or No.
The referendum has been declared illegal by Spain’s constitutional court and thousands of extra police have been sent to the region. Many of the extra officers have been stationed in two ships in the port of Barcelona.
The Madrid government has put policing in Catalonia under central control and ordered the regional force, the Mossos d’Esquadra, to help enforce the ban.
In a show of force, Spanish authorities have seized voting materials, imposed fines on top Catalan officials and temporarily detained dozens of politicians.
Police have also occupied the regional government’s telecommunications centre.
Spanish government sources quoted by Reuters said police would decide for themselves how to enforce orders to stop people voting on Sunday. The head of the Catalan police has urged officers to avoid using force.
Many of those inside the schools are parents and their children who remained in the buildings after the end of lessons on Friday. Many brought sleeping bags and bedded down on gym mats
“We don’t understand why we can’t express in a peaceful manner the simplest expression of democracy – a vote,” said Pablo Larranaga, at a Barcelona school on Saturday evening.
Catalonia, a wealthy region of 7.5 million people in north-eastern Spain, has its own language and culture.
It also has a high degree of autonomy, but is not recognised as a separate nation under the Spanish constitution.
Pressure for a vote on self-determination has grown over the past five years.
But Spanish unionists argue Catalonia already enjoys broad autonomy within Spain, along with other regions like the Basque Country and Galicia.
Does Catalonia want to leave Spain?
Spain’s distinctive north-eastern region
Why is Madrid so opposed?
Spanish Prime Minister Mariano Rajoy says the vote goes against the constitution which refers to “the indissoluble unity of the Spanish nation, the common and indivisible homeland of all Spaniards”.
Central government spokesman Iñigo Mendez de Vigo accused the Catalan government of being inflexible and one-sided, but it is a charge Catalan nationalists throw back at Madrid itself.
Demonstrations by independence campaigners have been largely peaceful.
“I don’t believe there will be anyone who will use violence or who will want to provoke violence that will tarnish the irreproachable image of the Catalan independence movement as pacifist,” Mr Puigdemont said.
BBC