During the rapturous celebrations in Barcelona’s Sant Jaume Square following the pronouncement of Catalonia’s independence on Friday, there was a nagging little detail in the background. Many demonstrators noticed it and there were shouts of “Fora, fora, la bandera espanyola! [Out with the Spanish flag!]” Indeed, even hours after the birth of the new Catalan Republic, the flag of what was now deemed a foreign country kept flying on top of the presidential palace.

Whether this was due to a technical difficulty or an oversight, it looked like a Freudian slip. For those in the square, independence was a long-held dream: but was it now a dream come true, or just a mirage?

Judging from their concerned looks, the nationalist leaders seemed aware of the fragility of their project. To secede is not, necessarily, to succeed. To have sovereignty, you need two things at least: international recognition and control over your territory.

Recognition has not been forthcoming, especially from where it matters most. The European Union, in its Brexit mindset, couldn’t be less inclined to pander to a region breaking away from a key member state such as Spain. As for control of the territory, the general strike set to begin tomorrow is aimed at giving the new republic at least some semblance of that, but it will be incomplete and temporary.

Madrid has invoked article 155 of the Spanish constitution, which allows it direct rule over a regional government. But the Spanish state has little presence in the region – Catalonia enjoys the highest possible level of autonomy, and to reassert itself, the central government may have to act forcefully.

This is what the nationalists both hope and fear: that in doing so, it may repeat the blunder of 1 October, when an attempt by the police to pre-empt an illegal referendum backfired spectacularly – by failing in its aim and also providing ugly scenes of violence. Now, arresting the Catalan president and his government for rebellion – as the state prosecutor has vowed to do – and taking control of a huge, and partly hostile, Catalan regional administration, could turn into a nightmare for Madrid.

Madrid knows this and that’s why prime minister Mariano Rajoy has decided to make an unexpected move: he has called a snap regional election. This crucial vote will be held on 21 December, the eve of Christmas Lottery Day in Spain. It’s an aptly chosen date, for this will be a gamble.

By calling an election so soon, Rajoy hopes to spare himself most of the nasty stuff of taking Catalonia to task by setting up a new regional government that would do the job for him. At the same time, he is forcing on the nationalists a tricky conundrum: if they take part in the vote, it will be a depressing climbdown for them, an admission that their independence is a mere bluff.

At least one nationalist party, the far-left CUP (Popular Unity Candidacy) will boycott in the vote, which makes a unionist victory more likely, especially with the Catalan administration hemmed in by Madrid. If all three of the nationalist parties finally shun the election, they will be shut out from the new parliament, and it could get cold outside.

Rajoy’s is a well-played hand, but perhaps also a bluff that could end in a flop. The nationalists may finally decide not to stand in the election and, if turnout is low, the new parliament’s legitimacy will look precarious. And if the nationalists pick up the gauntlet and present a united list, they could turn the election into an undeclared plebiscite on independence. This they may win, even if their platform for a sovereign republic will look somewhat redundant and contradictory.

Making the election happen at all may prove as difficult as winning it. With just over 50 days to go and neither side in full control, accidents can happen. Violence – hitherto almost completely absent – is unlikely, but not impossible. One good sign is that the Catalan government seems to have decided to leave the Catalan regional police out of the fray, but tensions are inevitable, and they can spiral out of control even if both sides intend to exercise restraint.

A lot will depend on luck. Christmas Lottery Day is going to be really dramatic this year.

Miguel-Anxo Murado is a Spanish writer and journalist