BARCELONA — Spanish Prime Minister Mariano Rajoy bet on a quick snap election in Catalonia as a way to bring order to the restive region. It didn't pay off.

Catalan separatists retained their absolute majority in the regional parliament in an election on Thursday that followed a chaotic referendum, a unilateral declaration of independence and Madrid stepping in to take control of the region.

The centrist, pro-unity Ciudadanos scored a bittersweet victory that saw it become the biggest group in the chamber but unable to form a government, while former regional President Carles Puigdemont’s group was the leading secessionist force.

Here are five takeaways from the election.

1. A new victory for pro-independence forces

The political drama of the past few months didn’t change the overall balance between those who want to break away from Spain and those who don't.

The three secessionist parties maintained their majority with a combined 70 seats, down two from the previous election in 2015, but enough to form a Cabinet. Significantly, they also kept their vote share at around 48 percent in spite of a record turnout of 82 percent — destroying the theory that more voters would mainly benefit the unionists.

The key to forming a Cabinet will be the radical-left CUP. The separatist party made clear during the campaign that it wouldn't back any government unless it committed to sticking to the same confrontational path that the secessionists have been following.

Ahead of the vote, Rajoy warned pro-independence parties against further confrontation that breaches the constitution. “They now know what happens when they do what shouldn’t be done,” he said.

2. Ciudadanos’ bittersweet night

The liberal, pro-unity Ciudadanos scored an unprecedented victory.

Eleven years after it was founded to fight Catalan nationalism, Ciudadanos became the biggest regional force, winning the votes of those opposed to independence and benefiting from massive defections from the Socialists and Rajoy’s conservatives in traditional unionist areas.

Yet it was not enough to deprive the separatists of their majority.

Ciudadanos local leader Inés Arrimadas had a strong campaign, and that will be of major concern for Rajoy. While the conservatives have used tactical voting to their advantage in the past — notably in the general election of 2016 when they warned against the possibility of the far-left ruling the country — they now realize the tables can be turned against them.

3. Puigdemont’s comeback

Former Catalan President Carles Puigdemont staged a surprising comeback that placed him in a position to be chosen again as leader of the region.

For that to happen, however, he would not only need to convince the Catalan Republican Left (ERC) and the radical CUP to agree on a new Cabinet. He would also have to avoid being arrested on his return to Spain from self-imposed exile in Belgium — he faces charges of rebellion, sedition and misuse of public funds.

The performance of the former journalist’s electoral list Junts per Catalunya was remarkable: A month ago, it was in fourth position in the polls, far behind its separatist allies in the ERC, who refused to run a joint campaign in the hope of capitalizing on their advantage in the polls.

4. Rajoy’s failure

The Spanish leader didn’t achieve his goal of depriving the separatists of their ruling majority, and he will now come under attack from all sides.

The left will criticize his heavy-handed, no-concessions approach to the Catalan problem, while right-wing commentators and critics inside his party will hammer him for not having intervened earlier, and more decisively.

Moreover, the local branch of his conservative Popular Party suffered a catastrophic result, going to just three lawmakers from 11.

5. Uncertain future

Much has happened in Catalonia since October: an illegal referendum on independence marred by police brutality, a unilateral declaration of independence that wasn’t implemented — or recognized by any country — Rajoy’s use of exceptional constitutional powers to sack the Catalan government and a series of judicial actions targeting Catalan officials that has seen some of them end up behind bars and others, including Puigdemont, fleeing the country.

Yet there's just as much uncertainty as there was in 2015. It’s unclear whether the Catalan rebellion can be quieted through negotiations on increased autonomy — or even if the two sides are in a position to engage in such talks.