In two weeks, Catalans will go to the polls to vote in a referendum on whether to secede from Spain and form an independent republic. Or will they?

Ever since Carles Puigdemont’s government called the referendum for 1 October, the central government in Madrid has been doing everything in its power to ensure that it does not happen. Madrid says the referendum is unconstitutional and so are the laws the Catalan parliament passed a week ago, which will in effect disconnect Catalonia from Spanish legislative and administrative control if the Yes vote prevails.

If the Catalan government’s strategy has been to provoke a reaction from Madrid, it has succeeded. While refusing to discuss the issue, the Spanish government has lashed out with a series of threats, including taking control of Catalonia’s finances by 18 September and abolishing its regional autonomy. It has threatened to bar Catalan leaders from holding office and even warned them that they could face jail. The attorney general has also said that any mayor who allows local authority buildings to be used as polling stations could face prosecution. Meanwhile, mayors who say they will not facilitate the referendum are being picketed and sent hate mail by pro-secessionists.

Anyone printing or distributing ballot papers or supplying ballot boxes risks prosecution, and the government has even threatened to cut off the electricity to schools serving as polling stations. It has warned postal workers against handling electoral material. The Mossos d’Esquadra, the Catalan police force who became local heroes over their handling of the terrorist attacks last month, have been ordered to intervene to prevent voting taking place.

Last Wednesday the Civil Guard shut the official referendum website, but within 24 hours Puigdemont had published a new link to the site on his Twitter account. WikiLeaks’s Julian Assange says he has been helping to defend the website.

Critics of the referendum, including Ada Colau, the mayor of Barcelona, say it lacks the necessary guarantees and has set no minimum level of participation. However, she has reached an agreement with Puigdemont to facilitate the vote in the capital. Meanwhile the Catalan government has sent letters to 55,000 citizens calling on them to run the polling stations. Under the Catalan referendum law they are obliged to take part, but the law has been ruled illegal by Spain’s constitutional court.

In a last-ditch effort to break the deadlock, Colau and Puigdemont have sent a joint letter to the prime minister, Mariano Rajoy, and the king pleading for dialogue and a legally binding referendum. In the letter they appeal for an “open and unconditional dialogue”. Rajoy insists that he is open to dialogue on any topic – except a referendum on independence.

The Yes camp has successfully created an image of consensus around independence – witness the million people they mobilised on the streets of Barcelona last week for Catalonia’s national day – but these impressive shows of popular power mask the fact that there is still only a minority in favour of secession. A survey at the end of July found that 49.4% of Catalans were against independence and 41.1% supported it.

When a similar referendum was held in November 2014, 80% voted Yes. However, the turnout of barely 37% suggested that No voters had boycotted the poll. There are fears this will be repeated on 1 October, but the Catalan government seems bent on a declaration of independence, however small the margin in favour.

Colau has accused the Catalan government of “ignoring half the Catalan population”. The day after the national day march , La Vanguardia, the voice of mainstream nationalism and the business community, published an editorial that read: “An assault on the constitution is not the way forward, even though it appeals to hundreds of thousands of people … Half of Catalonia doesn’t support the separatist cause … and many people have yet to recover from the stupor of seeing the methods parliament used last week to pass the so-called disconnection laws.”

As yet, appeals for calm are being ignored on both sides, but conscious of Spain’s long history of internal strife and violent conflict many are hoping for some last-minute compromise that will avert a head-on collision.