TWO years ago Poland looked on in disbelief as the British voted for Brexit. Now the country may face its own vote. Andrzej Duda, the president, wants to tackle the question of Poland’s relationship with the EU in a broader referendum on constitutional reform this autumn, on the centenary of Polish independence after the first world war. With relations between the ruling Law and Justice (PiS) party and Brussels fraught, and Brexit looming, the proposal has raised eyebrows. If the referendum gets the Senate’s go-ahead, Europe will be watching.

Mr Duda, a former PiS member, has long argued that Poland’s 1997 constitution needs updating. On June 12th he proposed 15 questions spanning a hotch-potch of subjects, from social policy to food security, adding a reference to “Poland’s and Europe’s over-thousand-year Christian heritage” to the preamble. Two of the questions focus on Poland’s relationship with the EU. The first asks whether Poland’s EU membership should be constitutionally guaranteed. The other asks whether the constitution should enshrine its own primacy over international and European law.

The timing is awkward. The Polish government is locked in a protracted dispute with the European Commission, which has warned that its judicial reforms undermine the rule of law. Twenty-seven out of 72 Supreme Court judges will be forced to retire at the start of July. Time is running out: Warsaw has been given until June 26th to assuage Brussels’ concerns. If not, Warsaw might in theory have its voting rights in the EU suspended, though that remains unlikely. More realistically, the European Commission wants to establish a mechanism that could cut EU funds, of which Poland is the biggest beneficiary, for countries where the rule of law is at risk.

Neither Mr Duda nor PiS is calling for a “Polexit”. But since PiS came to power in 2015 Eurosceptic rhetoric has surged. Like Viktor Orban, the Hungarian prime minister, PiS opposes what he recently called “delusional nightmares of a United States of Europe”. “Sovereignty” is the buzz word in Warsaw. In a speech last month, Mr Duda went so far as to liken EU membership to the 1795 partition of Poland, which wiped the country off the map for 123 years.

Poles remain broadly pro-European. Some 70% of them think that EU membership is good for the country, above the EU average of 60%, according to the latest Eurobarometer survey. Few want Poland to leave the EU (11%, compared to 83% for staying in). Meanwhile, enthusiasm for the referendum remains low. Even PiS has kept its distance, fearing a poor turnout.

Still, Mr Duda’s questions have caused a stir. Among liberals, they have stoked fears that PiS is leading the country towards Polexit. Meanwhile, on June 16th, the (tiny) National Movement announced efforts to lead Poland out of the EU. Mr Duda argues that enshrining Poland’s EU membership in the constitution will “strengthen” its presence in the bloc. Yet, as Britain’s referendum shows, he is playing with fire.