More than 80% of voters backed the independence of Catalonia during an informal poll, officials say.
The non-binding vote went ahead after Spain’s constitutional court ruled out holding a formal referendum in the autonomous north-eastern region.
More than two million people out of an estimated 5.4 million eligible voters took part in the ballot.
Catalan leader Artur Mas hailed the poll “a great success” that should pave the way for a formal referendum.
“We have earned the right to a referendum,” he told cheering supporters.
“Once again Catalonia has shown that it wants to rule itself.”
He added: “I ask the people in the world, I ask the media and I also ask the democratic governments in the world to help the Catalan people decide its political future.”
The ballot was held in the face of fierce opposition from the Spanish government.
Speaking beforehand, Spanish Justice Minister Rafael Catala dismissed the exercise as “fruitless and useless”.
“The government considers this to be a day of political propaganda organized by pro-independence forces and devoid of any kind of democratic validity,” he said in a statement.
Voters were asked two questions – whether they wanted Catalonia to be a state and whether they wanted that state to be independent.
Vice President Joana Ortega said that more than two million people had taken part in the “consultation of citizens” and that with almost all votes counted, 80.72% had answered “Yes” to both questions.
Just over 10% voted yes for the first question and no for the second, he said, and about 4.5% voted no to both questions.
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 favor of full independence.
Spanish unionist parties argue that because the ballot was organized 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.
The Catalan National Assembly pressure group collected signatures at polling stations on a petition to be sent to the UN and the European Commission asking for help to convince Spain to allow an official referendum.
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.
[youtube EKsCPpU1hak 650]