Catalan emergency officials say 761 people have been injured as police used force to try to block voting in Catalonia’s independence referendum.
The Spanish government has pledged to stop a poll that was declared illegal by the country’s constitutional court.
Police officers prevented some people from voting, and seized ballot papers and boxes at polling stations.
In the regional capital Barcelona, police used batons and fired rubber bullets during pro-referendum protests.
The deadline for voting was 2000 hours (18:00 GMT), but a Catalan government spokesman said that anyone in the queue at that time would be allowed to vote.
Speaking soon after the deadline, Spanish Prime Minister Mariano Rajoy said he did not acknowledge the vote, adding that Catalans had been fooled into taking part in an illegal vote.
The Spanish interior ministry said 12 police officers had been hurt and three people arrested adding that 92 polling stations had been closed.
The national police and Guardia Civil – a paramilitary force charged with police duties – were sent into Catalonia in large numbers to prevent the vote from taking place.
Since Friday, thousands of people have occupied schools and other buildings designated as polling stations in order to keep them open.
Many of those inside 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.
a head injury in Barcelona
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. Firefighters have acted as human shields between police and demonstrators.