In what turned out to be an unofficial poll, voters in Catalonia opted decidedly for independence.
Of the 2,250,000 people, including foreign residents, who turned out to vote, about 80% backed independence from Spain, according to the poll organisers. The region’s population is 7.5 million.
The vote was declared illegal by the country’s constitutional court, but Catalan authorities decided to press ahead with it as a “consultation of citizens” even though it would be non-binding and without any legal impact.
Artur Mas, the Catalan leader, hailed it as a great success adding that it should pave the way for a formal referendum.
"Once again Catalonia has shown that it wants to rule itself,” he said.
"We have earned the right to a referendum," he told cheering supporters.
Spanish justice minister Rafael Catala accused Mr Mas of organising an act of “pure political propaganda” with no validity, adding that Madrid could take more legal action against the vote.
Mr Mas could now press for a binding referendum, although the matter is still under consideration by the constitutional court.
The Catalan population, 16% of Spain, has its own language, literature, and culture. Many residents resent the fact that its prosperity means it contributes more to the Spanish economy than it receives in government grants.