At least 92 people were confirmed injured out of a total of 844 who needed medical attention, Catalan authorities said, as police cracked down on a vote Spain's central government branded a "farce".
The interior ministry said 33 police required treatment as a result of the clashes,
The violence raised alarm abroad and further heightened tensions between Rajoy's government and the authorities in Catalonia in the worst political crisis in Spain in decades.
Rajoy thanked security forces for upholding the law and doing their job.
The people of Catalonia had been tricked in to taking part in the banned vote, Rajoy said on Sunday, adding that the referendum was a strategy by the regional government against legality and democratic harmony and was a "path that leads to nowhere".
He also called to meet with all Spanish political parties to discuss the country's future following the referendum.
Spanish riot police used batons and rubber bullets to storm polling stations in Catalonia Sunday, triggering clashes as thousands turned out to vote in an independence referendum banned by Madrid.
The referendum was organised in secret under the threat of reprisals and criminal charges but thousands of Catalans stood in defiance of the central government crying "Votarem" - "We will vote".
'Unjustified violence'
The crackdown drew a sharp rebuke from Catalan leaders and others including Nicola Sturgeon, leader of the pro-independence Scottish National Party.
"The unjustified use of violence, which is both irrational and irresponsible, by the Spanish state will not stop the will of the Catalan people," Catalan president Carles Puigdemont said.
The police, he said, had used "batons, rubber bullets and indiscriminate force" against people demonstrating "peacefully".
"The head of a cowardly government has flooded our city with police," Barcelona Mayor Ada Colau wrote on Twitter, adding: "Barcelona city of peace, we are not afraid" -- a slogan coined after August's jihadist vehicle rampage that killed 16 people.

National Police block people from entering a polling center at Sant Julia Sports Center in Barcelona, Catalonia, on 1 October, 2017. Source: AAP
Riot police also stormed a polling station near Girona, smashing the glass doors of the sports centre where Puigdemont was due to vote and cutting a chain to force their way in.
But the regional government said Puigdemont had managed to vote anyway in nearby Cornella del Terri, and in several areas voting was reported to be peaceful.
The trouble caused Barcelona football club to play its La Liga tie against Las Palmas behind closed doors after the Spanish league refused to postpone the match.
Under a sea of umbrellas outside a school in Barcelona, a crowd gathered, among them elderly people in wheelchairs, families with buggies and parents clutching toddlers by the hand.

Source: AAP, AP
With no police in sight, they were able to cast their ballots, prompting scenes of jubilation.
"I've voted! I've voted," one man shouted.

Catalan people who gathered outside the Ramon Llull school clash with Spanish National riot policemen during the '1-O Referendum' in Barcelona, Catalonia. Source: AAP
"That's the great hope, to be able to vote freely like this despite the problems we've faced, I'm very happy. I can die peacefully," added Jose Mas Ribas, 79.