Voting stations have closed in Catalonia as Spain's prime minister condemned the referendum on independence and praised the police response.

In a televised speech Mariano Rajoy insisted no independence vote had taken place and said those organising the referendum had defied the rule of law.

He also praised police for their "firmness and serenity" following clashes in which Catalan health officials say 761 people were injured.

Applause broke out at a polling station in Barcelona as ballots closed at 8pm local time. A few remained open as people waited to vote.

The "yes" pile was many times bigger than the "no" pile.

Barcelona's mayor Ada Colau said earlier that she wanted "an immediate end to police charges against the defenceless population".

Police baton-charged and fired rubber bullets to disperse crowds in Barcelona and other towns and cities.

Videos showed them beating people repeatedly as they try to confiscate ballots and ballot boxes.

In addition to the protesters and voters injured, Spain's Interior Ministry said 11 police officers have been injured fulfilling judicial orders to prevent the referendum on independence.

Earlier Catalan government spokesman Jordi Turull blamed the violence directly on Mr Rajoy and interior minister Juan Ignacio Zoido.

He said actions by Spanish National Police and Civil Guard forces on Sunday were politically motivated and showed "a clear motivation to harm citizens".

Catalan international affairs director Raul Romeva said regional authorities would appeal to European bodies over Mr Rajoy's government's alleged violations of human rights.

The referendum was held by regional separatist leaders in defiance of Spain's Constitutional Court that had suspended the vote.

The Spanish government said the vote would be void and police sealed off many voting centres and used force to stop people from using their ballot.

Catalonia is one of the country's most affluent regions, contributing a fifth of Spain's economy and separatist Catalans complain of contributing too much to the state while not getting enough in return.