Catalonia's independence referendum has begun in chaotic fashion, with clashes taking place as police attempt to prevent the vote from taking place.
The Spanish government has pledged to stop a poll that was declared illegal by the country's constitutional court.
Police officers are preventing people from voting, and seizing ballot papers and boxes at polling stations.
Nonetheless, Catalan government officials have predicted a big turnout.
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.
Ahead of the polls opening, the Catalan government said voters could print off their own ballot papers and use any polling station if their designated voting place was shut.
How is the day unfolding?
In the town of Girona, riot police smashed their way into a polling station where the region's leader Carles Puigdemont was due to vote.
Television footage showed them breaking the glass of the sports centre's entrance door and forcibly removing those attempting to vote.
However, Reuters news agency reports that Mr Puigdemont was still able to cast his ballot.
Meanwhile, in the regional capital Barcelona, police fired rubber projectiles at pro-independence protesters.
Reports say at least two people have been injured during clashes in the city.
Thousands of separatist supporters had occupied schools and other buildings that have been designated as voting centres ahead of the polls opening.
Many of those insides were parents and their children, who remained in the buildings after the end of lessons on Friday and bedded down in sleeping bags on gym mats.
In some areas, farmers positioned tractors on roads and in front of polling station doors, and school gates were taken away to make it harder for the authorities to seal buildings off.
But police insisted polling stations would not be allowed to open, and that those insides would be evicted.
Referendum organisers have called for peaceful resistance to any police action.
How did Madrid prepare for the vote?
Thousands of extra police officers have been sent to the region, many of them based on two ships in the port of Barcelona.
The Spanish government has put policing in Catalonia under central control and ordered the regional force, the Mossos d'Esquadra, to help enforce the ban on the illegal referendum.
In a show of force ahead of the poll, Spanish authorities 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.
Nonetheless, Catalan government officials have predicted a big turnout.
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.
Ahead of the polls opening, the Catalan government said voters could use any polling station if their designated voting place was shut.
Why is a vote being held?
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.
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 that 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 a pacifist," Catalan leader Carles Puigdemont said.
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".