Separatists looked set on Friday to regain power in Catalonia after voters rejected Spanish Prime Minister Mariano Rajoy's attempt to defuse the independence movement, instead re-igniting the country's biggest political crisis in decades.
Spanish markets recoiled at a surprise result that is also a setback for the European Union, which must now brace for more secessionist noise as it grapples with the disruption of Brexit and simmering east European discontent.
By risking an election in the wealthy region, Rajoy appears to have made the same mistake that leaders such as Greece's Alexis Tsipras, Britain's David Cameron and Italy's Matteo Renzi have made in recent years: betting that voters would resolve their troublesome domestic conundrums for them.
With the count from Thursday's Catalan parliament election almost complete, separatist parties had secured a slim majority, sending stocks down around 1 percent on fears that the euro zone's fourth-largest economy will be hurt by tensions with its richest region.
After several strained months that saw secessionists organise an illegal referendum on Oct. 1, and police confiscate urns to try to prevent it from taking place, the regional election has failed to produce a solution to the standoff.
Rajoy is weakened; the secessionists kept a majority, but it was reduced and they may have difficulty forming a government; and support for the unionist Ciudadanos has surged, but not enough to catapult them into power.
"Catalonia is back to square one," said Marco Protopapa, an analyst at JP Morgan, forecasting that tensions would quickly return between Madrid and an "emboldened pro-independence camp eager to exploit the tactical advantage of a favourable election outcome".
With Catalonia accounting for a fifth of its economy, Spain had already trimmed growth forecasts for 2018, and the prospect of prolonged uncertainty worries business leaders.
"More companies leaving, less economic activity there - and worse for everyone," said the chief executive of a major listed Spanish company, speaking on condition of anonymity because of the tense climate of the independence debate.
More than 3,100 firms have shifted their headquarters out of the region since October's referendum.
REJECTION FOR RAJOY
Rajoy, who called the election after sacking the previous, secessionist government, had hoped to mobilise hitherto quiescent supporters of union with Spain and deal separatism a decisive blow.
Instead, his own party performed miserably, and the result raises the question of a return to power for Carles Puigdemont, the Catalan president he had deposed.
Puigdemont, who campaigned from Belgium after fleeing Spain to avoid arrest for sedition, said now was the time for dialogue between him and Rajoy.
"We've at least won the right to be heard," he said, adding that he was open to returning to Spain if guarantees were given that he could take his position as head of a potential new Catalan government. Currently he faces the prospect of arrest for his role in organising the banned referendum.
Rajoy was due to make a statement at 1300 GMT.
Secessionists say Catalonia pays an unfair share of taxes to Madrid, but investors fear independence would knock the indebted region out of the EU and the euro zone by default.
"There is a huge effect on investment from abroad. As there's a lack of stability here, people who were investing here are going to other cities and other regions," said Rafael Prisco, commercial director in a real estate agent in central Barcelona that deals mostly with foreign clients.
Overnight hotel stays rose 2.1 percent in Spain in November, but fell 7.3 percent in Catalonia, the National Statistics Institute said.
GERMANY AND FRANCE BACK RAJOY
When the Catalan parliament declared independence after the referendum, Rajoy invoked constitutional powers to impose direct rule from Madrid. He promised to restore Catalonia's autonomy regardless of the election result, but could re-impose it if a new government again pursued secession.
The EU's major powers, Germany and France, have backed his anti-independence stance despite some criticism of his methods at times.
Meanwhile, Puigdemont's attempts to gain international support in Brussels have failed so far. He has called the EU a "club of decadent countries" for declining to mediate a solution.
A German government spokeswoman on Friday urged reconciliation in Catalonia, adding that the Spanish constitution - which bars any territorial breakup - would have to be respected.
Europe now ends the year having struggled to build on the integrationist Emmanuel Macron's victory in the French presidential election in May. Germany faces months of political limbo, Brussels is mired in a nasty dispute with Poland's right-wing government and a far-right party has just entered the government in Austria.
Catalonia's separatist parties won 70 of the 135 seats, compared with 72 last time, with Puigdemont's Junts Per Catalunya (Together for Catalonia) retaining its position as the largest separatist force.
Ciudadanos (Citizens) won the most votes, but other unionist forces -- Rajoy's People's Party and the Socialist Party -- registered a dismal performance.
"It's a bitter victory," said Paloma Morales, a 27-year-old student at a Ciudadanos rally. "It means four more years of misery."