Catalan President Artur Mas, who has implemented unpopular spending cuts, had called an early election to test support for his new drive for independence for Catalonia, a wealthy but financially troubled region in northeastern Spain (see background).
Voters frustrated with the economic crisis and the Spanish tax system, which they claim is unfair to Catalonia, handed almost two-thirds of the 135-seat local parliament to four different separatist parties that all want to hold a referendum on secession from Spain.
But they punished the main separatist group, Mas's Convergence and Union alliance, or CiU, cutting back its seats to 50 from 62.
That will make it difficult for Mas to lead a united drive to hold a referendum in defiance of the constitution and the central government in Madrid.
"Mas clearly made a mistake. He promoted a separatist agenda and the people have told him they want other people to carry out his agenda," said José Ignacio Torreblanca, head of the European Council on Foreign Relations' Madrid office.
The result will come as a relief for Spanish Prime Minister Mariano Rajoy, who is battling a deep recession and 25% unemployment while he struggles to cut high borrowing costs by convincing investors of Spain's fiscal and political stability.
Mas, surrounded by supporters chanting "independence, independence", said he would still try to carry out the referendum but added that, "it is more complex, but there is no need to give up on the process."
Resurgent Catalan separatism had become a major headache for Rajoy, threatening to provoke a constitutional crisis over the legality of a referendum just as he is trying to concentrate on a possible international bailout for troubled Spain.
Catalonia shares some of its tax revenue with the rest of Spain and many Catalans believe their economy would prosper if they could invest more of their taxes at home. The tax issue has revived a long-dormant secessionist spirit in Catalonia.
Mas had tried to ride the separatist wave after hundreds of thousands of people demonstrated in the streets in September, demanding independence for Catalonia, which has its own language and sees itself as distinct from the rest of Spain.
In a speech to supporters on Sunday night Mas recognised that he had lost ground and though CiU is still the largest group in the Catalan parliament, he said he would need the support of another party to govern and to pass harsh austerity measures.
"We've fallen well short of the majority we had. We've been ruling for two years under very tough circumstances," he said.
ERC makes big gain
Catalonia's traditional separatist party, the Republican Left, or Esquerra Republicana (ERC), led by Oriol Junqueras, won the second biggest presence in the Catalan parliament, with 21 seats, more that the double what they had before. The Socialists took 20 seats. And Rajoy's centre-right People's Party won 19.
Three other parties, including two that want a referendum on independence, split the remaining 25 seats. ECFR's Torreblanca said the Catalan elections were similar to those around Europe in that economic woes have benefited marginal political groups, while larger, traditional parties have lost ground.
"Mas talked about independence so much that he ended up helping the only party that has always been for independence, which is the Republican Left," said political analyst Ismael Crespo at the Ortega y Gasset research institute.
Mas's CiU had always been a pro-business moderate nationalist party that fought for more autonomy and self-governance for Catalonia without breaking away from Spain.
Turnout was very high in the election, 68%, 10 percentage points higher than in the previous vote two years ago.