The leader of Spain's Catalonia region, where a separatist movement is in full swing, on Friday announced an independence referendum for October 1 in defiance of Madrid.
People will be asked to vote on the question: "Do you want Catalonia to be an independent state in the form of a republic," Carles Puigdemont said in Barcelona.
If a majority votes "yes," the northeastern region's pro-independence government has said it will immediately start proceedings to separate from Spain.
But the central government in Madrid is firmly against the referendum, which Puigdemont had previously announced would take place without setting a date, and which Spain's Constitutional Court has already ruled is illegal.
As such, Catalan authorities face an uphill struggle to even hold a vote that would force people to break the law, particularly civil servants who will be called on to help organise the poll.
"Let there be no doubt that anything that goes from a mere announcement to an act will be appealed by the government, as have been every single attempts to defy our legal system," Spanish government spokesman Inigo Mendez de Vigo told reporters.
Catalonia, a wealthy, 7.5-million-strong region with its own language and customs, has long demanded greater autonomy.
For years separatist politicians in the region have vainly tried to win approval from Spain's central government to hold a vote similar to Scotland's 2014 independence referendum from Britain, which resulted in a "no" vote.
And while Catalans are divided on the issue, with 48.5 percent against independence and 44.3 percent in favour according to the latest regional government poll, close to three-quarters support holding a referendum.
In 2014, Catalonia held a non-binding vote under its then president Artur Mas, in which more than 80 percent of those who cast a ballot chose independence, although just 2.3 million out of 6.3 million eligible voters took part.
But in holding the symbolic referendum, Mas went against the Constitutional Court, which had outlawed the vote -- despite it being non-binding.
He was later put on trial and banned from holding office for two years.
Puigdemont now wants a binding referendum -- even though Madrid has pledged to be just as tough this time round.
In February, the Constitutional Court ruled against the planned referendum and warned Catalan leaders they faced repercussions if they continued with their project.
Catalonia's officials have had little luck pushing their project abroad either.
Regional authorities also face a host of challenges just to hold the referendum without Madrid's consent.
Civil servants such as the police or the heads of schools where polling stations could be set up, for instance, will be needed to help organise the vote, forcing them into a delicate situation.
If they disobey orders by their Catalan bosses, they could face disciplinary sanctions.
But if they obey, they will go against Spanish law and will therefore face sanctions too, which may even entail losing their jobs.
Added to this, none of the necessary accessories for an election would be available, such as an official campaign or an independent authority to oversee the vote.
And the central government has more drastic ways to stop the referendum.
It can ask the Constitutional Court to suspend Puigdemont for disobedience, or it has the power to take temporary control of the regional government, even if this would be a last resort.
In a bid to circumvent such action, the regional government has drafted a law seeking to extract Catalonia from Spain's legal system.
It is expected to present the bill in the next few weeks to the regional parliament, where pro-independence lawmakers have an absolute majority.
But this too will likely be suspended by the Constitutional Court.
"There won't be a referendum, even Puigdemont knows it," said Albert Rivera, the leader of Ciudadanos, a nationwide party that was originally created in Catalonia to counter nationalist politicians.
He told reporters he thought the likely failure of the independence drive would precipitate regional elections, and urged Puigdemont "to put an end to this nightmare".