The gamble by the Spanish government to call a snap regional election in Catalonia to head off a secessionist push appears to have backfired after pro-independence parties won an absolute majority.
Although the pro-Madrid Citizens party was the biggest winner on Thursday (21 December) with 36 seats, it was swamped by the success of the separatists who garnered 70 out of the 135 seats in the regional parliament.
Speaking in Brussels, ousted Catalan President Carles Puigdemont said the "Catalan republic" had won and "the Spanish state has been defeated".
"As Catalan president I wish to congratulate people for delivering an indisputable result. We have won this election in exceptional circumstances, with candidates in prison, with the government in exile and without having the same resources as the state," he said.
Puidgemont faces possible charges of rebellion, sedition and misuse of public funds after Madrid stripped the region of its autonomy and said an October independence referendum that he called was illegal.
He is in self-imposed exile in Belgium because he does not feel he will get a fair trial. His former vice-president, Oriol Junqeras, leader of the Catalan Republic Left (ERC) is in prison as are two pro-independence leaders.
Turnout was high at over 82% with Puidgemont's party Together for Catalonia, taking 34 seats, the ERC winning 32 and the anti-capitalist Popular Unity Candidacy taking four.
It is unclear how the government will be formed, although the pro-independence parties have enough seats between them to take power in they agree to forming a coalition.
Marta Rovira, number two on the ERC ticket, said: "Now we have to reopen parliament and respect the democratic mandate."
Unionists and separatists celebrated on Thursday night (21 December) as they both claimed victory. Leader of the pro-Spanish Citizens party that won the most votes, Ines Arrimadas said: "The pro-secession forces can never again claim they speak for all for Catalonia.
"We are going to keep fighting for a peaceful co-existence, common sense and for a Catalonia for all Catalans."
Reaction from within the EU sided with the unionists, with Brussels' Brexit coordinator Guy de Verhoftstadt tweeting: "The hardest challenge remains finding a common way to heal the Catalan society".
The European Commission said that its stance towards Catalonia remained the same, despite the election result and that events in the region are an internal issue for Spain.
"Our position on the question of Catalonia is well known and has been regularly restated, at all levels. It will not change," commission spokesman Alexander Winterstein told AFP news agency.
"In relation to a regional election, we have no comment to make," he added.