An informal vote on independence for Catalonia has shown more than 80% in favour, organisers say.
The provisional results followed a day of voting across the region in north-eastern Spain.
Earlier, Catalan leader Artur Mas hailed the non-binding poll "a great success" that should pave the way for a formal referendum.
The non-binding vote went ahead after Spain's constitutional court ruled out a formal referendum.
Spanish Justice Minister Rafael Catala dismissed the poll as "fruitless and useless".
"The government considers this to be a day of political propaganda organised by pro-independence forces and devoid of any kind of democratic validity," he said in a statement.
Vice President Joana Ortega said that more than two million people had taken part in the poll and that with almost all votes counted, 80.72% had backed independence.
Mr Mas said that the "consultation of citizens" was a historic success that set the stage for a full referendum.
"We have earned the right to a referendum," he told cheering supporters.
"Once again Catalonia has shown that it wants to rule itself."
Voters were asked whether they wanted a Catalan state and whether that state should be independent.
Opinion polls suggest that as many as 80% of Catalans want an official referendum on the issue of Catalonia's status, with about 50% in favour of full independence.
Spanish unionist parties argue that because the ballot was organised by grassroots pro-independence groups it cannot legitimately reflect the wishes of the region.
More than 40,000 volunteers helped to set up and run the informal exercise.
Nationalism in Catalonia has been fuelled by economic and cultural grievances. The wealthy region of 7.5 million people contributes more to the Spanish economy than it gets back through central government funds.
The Libres e Iguales (Free and Equal) group, which opposes the vote, held protests in dozens of cities.
One protest in Barcelona witnessed minor scuffles but no arrests.
Other rallies in favour of the vote were also held.