Catalonia's regional leader opened the door to a unilateral declaration of independence from Spain after voters defied a violent police crackdown and voted 90 percent in favour of breaking away.

Carles Puigdemont's comments followed a television address by Spanish Prime Minister Mariano Rajoy who ruled out independence and accused separatists of trying to "blackmail ... the whole nation". He offered all-party talks on the region's future.

Despite Spanish police using batons and rubber bullets to disrupt the banned referendum, which was declared unconstitutional by Madrid, the Catalan government said 2.26 million people cast ballots, a turnout of about 42 percent.

Catalan officials say more than 800 people were injured in clashes with Spanish riot police during the referendum.

Rift deepened

The referendum has pitched the country into its deepest constitutional crisis in decades and deepened a rift between Madrid and Barcelona.

"On this day of hope and suffering, Catalonia's citizens have earned the right to have an independent state in the form of a republic," Puigdemont said in a televised address.

"My government, in the next few days will send the results of today's vote to the Catalan parliament, where the sovereignty of our people lies, so that it can act in accordance with the law of the referendum."

READ MORE: Catalonia referendum: As it happens

Puigdemont added he would appeal to the European Union to look into alleged human rights violations during the vote.

"Today the Spanish state wrote another shameful page in its history with Catalonia."

Catalan officials said 844 people had been injured in the police crackdown and the Spanish Interior Ministry said 12 police officers had been hurt.

Spain's deputy prime minister said force used by the police had been proportionate.

"The absolute irresponsibility of the regional government has had to be met by the security forces of the state," said Soraya Saenz de Santamaria.

Treated 'like criminals'

Elisa Arouca, who was waiting to vote outside the Estel school in central Barcelona, reacted with anger when national police agents yanked her and other prospective voters out of the way, then smashed open the door and confiscated ballot boxes.

"I was always against independence, but what the Spanish state is doing is making me change my mind," she said. "The national police and civil guard are treating us like criminals."

No one knows what will happen if Catalan officials follow through on their pledge to use the vote as a basis for declaring independence, a provocation that would possibly remove from Spain one of its most prosperous regions, including the coastal city of Barcelona, the regional capital.

In another sign tensions would endure beyond the vote, secessionist groups and trade unions in Catalonia called a general strike for Tuesday, La Vanguardia newspaper said.