Catalan separatists won a crucial snap poll, plunging their region into further uncertainty after a failed independence bid rattled Europe and triggered Spain's worst political crisis in decades.
With turnout at a record high and 99.6 percent of the ballots counted, the election handed a mandate back to the region's ousted separatist leaders, even after they campaigned from exile and behind bars.
In a clear indicator of the huge gulf over independence afflicting Catalan society, anti-secessionist centrist party Ciudadanos was meanwhile on course to win the biggest individual result with 37 of the 135 seats in the regional parliament.
"It's a strange feeling. We won the majority of seats, but we lost in votes. As such both sides will be able to claim victory," 26-year-old doctor and separatist supporter Fran Robles told AFP after the results were announced.
"It's a good reflection of the reality that Catalonia is politically divided," he added.
But unless the three pro-independence lists fail to clinch a deal to work together in the coming months, they will rule Catalonia with 70 of the 135 seats in parliament -- two less than their previous tally of 72.
For Catalans on both sides of the divide the day had been a moment of truth, following weeks of upheaval and protests unseen since democracy was reinstated following the death in 1975 of dictator Francisco Franco .
"This is a result which no one can dispute," deposed leader Carles Puigdemont said from self-imposed exile in Belgium, as he celebrated the separatists' win.
"The Spanish state was defeated. (Spanish Prime Minister Mariano) Rajoy and his allies lost," he told reporters.