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 20:00 local time (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.
What is the latest?
The Spanish interior ministry said 12 police officers had been hurt and three people arrested. It added 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.
Barcelona’s Mayor Ada Colau condemned police actions against what she called the region’s “defenceless” population
Spain’s Deputy Prime Minister Soraya Saenz de Santamaria said police had “acted with professionalism and in a proportionate way”
Jordi Turull, the spokesman for the Catalonia regional government, described the actions of the Spanish state as “the shame of Europe”
The Guardia Civil said it was “resisting harassment and provocation” while carrying out its duties “in defence of the law”
One voter, Júlia Graell, told the BBC that “police started to kick people, young and old”, adding: “Today, I have seen the worst actions that a government can do to the people of its own country.”
In Girona, riot police smashed their way into a polling station where Mr Puigdemont was due to vote, and forcibly removed those looking to place their ballots. Mr Puigdemont was able to vote at another polling station.
The BBC’s Tom Burridge, in Barcelona, witnessed police being chased away from one polling booth after they had raided it.
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.