Britain isn’t the only country affected by Brexit. Its decision to hand back its membership is forcing other European nations to assess their relationship with the EU. Among these is Poland, now the bloc’s fifth-largest country by population size, which has been governed by the rightwing populist Law and Justice party (PiS) since 2015. Amid the coverage of Britain’s protracted exit from the EU, a new term has entered political discourse here: “Polexit”.

After waking to the results of the British referendum on the morning of 24 June 2016 in Warsaw, I attended a press conference at PiS’s headquarters, above a pool club on bustling Nowogrodzka Street. “Brexit is obviously a very bad event,” said the party’s chairman Jarosław Kaczyński, who is considered the country’s informal leader, standing stiff and pale on the stage. “I wish to strongly emphasise that Poland’s place is in the EU, regardless of the result of the vote in Britain,” he added.

'Declaration of war': Polish row over judicial independence escalates Read more

Despite his reassurances, Kaczyński seems to be having his cake and eating it. By remaining in the EU, PiS can shape EU institutions from within, according to its own rightwing objectives. Indeed, the centrist opposition party Civic Platform warns that PiS may cause damage to the EU in other ways.

“I do not think that in the foreseeable future anyone would dare to publicly declare leading Poland out of the EU,” said Donald Tusk, Poland’s prime minister from 2007-14 and former leader of Civic Platform, when giving a lecture last month in Białystok, eastern Poland. Rather, the danger is that Poland becomes part of a “procession of lunatics who do not want to leave the EU, do not want the EU to shatter, but more or less consciously are doing everything so that the EU is weakened,” he warned.

Poland’s history and location has given its EU membership an existential dimension. As far as Poles are concerned, their country was “kidnapped” from the west by the Soviet Union in 1945, to use a term from a 1984 essay by Czech writer Milan Kundera. From this perspective, the collapse of communism in central Europe in 1989 was the beginning of Poland’s return to Europe, which formally culminated in its EU accession in 2004. Without natural borders like the Channel to protect it from aggressive neighbours, EU membership affirms that Poland is part of the same Europe as France, Germany and Italy, rather than a pawn in Russia’s sphere of influence.

After more than 15 years in the EU, Poles still remain pro-European. 86% believe that their country has benefited from EU membership, one of the highest percentages levels in the EU and well above the EU27 average of 68%, according to a Eurobarometer poll from spring 2019. In a poll released in January, the EU scored as the most trusted institution among Poles, ahead of domestic institutions such as the courts and the public media .

Still, Warsaw’s relationship with Brussels has been strained since PiS entered government. Poland has been locked in a protracted conflict with EU institutions over its judicial changes, which the European commission has warned undermine the rule of law. Together with Hungary’s prime minister, Viktor Orbán, PiS has challenged the idea that liberal democracy is the only game in town and normalised values typically associated with the far right, including disbanding a government body that dealt with racism and xenophobia and championing homophobia.

The crisis of the centre-right could rot the European Union from within | Jan-Werner Müller Read more

But the most substantial threat to the EU comes from PiS’s capture of the judiciary. In January, the commission asked the European court of justice to freeze a law approved by Poland’s parliament that allows the government to dismiss judges who are critical of its changes to its legal system. The government has tried to shrug off these charges, claiming that courts are beyond the EU’s jurisdiction. If they remain unaddressed, the Polish government’s judicial changes could have a wider impact on the rule of law in Poland and the EU. According to the Polish ombudsman Adam Bodnar, the new law amounts to “a major step towards a legal Polexit”. By challenging EU rules the Polish government is effectively placing itself outside the European community. And by undermining the rule of law, Warsaw is eroding one of the fundamental values that the EU was founded upon.

Although there is little prospect of Poland following in Britain's footsteps, the country's rightwing leadership may shake the EU's core in a different way: by diverging from its norms and weakening the rule of law. Aware of Poles’ broad support for the EU, PiS made “Poland Heart of Europe” its slogan ahead of the European parliament elections last year. The real "Polexit" may not involve formally leaving the European Union - but undermining it from within.

• Annabelle Chapman is a journalist based in Warsaw