I lived in Poland in bad times, when it seemed that political repression would stretch ahead to infinity. I have experienced the soaring good times, when Polish courage gave hope to the world. And I have seen the country in challenging in-between times – when difficulties and opportunities seemed equally great.

Never, however, has there been such an assault on basic rights within the context of the parliamentary democracy that Poland has enjoyed since 1989 – achieved by Poles through their historic defeat of a foreign-imposed police state.

To be clear: Jarosław Kaczyński’s rightwing Law and Justice party has every right to rule. It won 37% of votes cast in October and, thanks to a split among the liberals (for which Kaczyński and his allies can hardly be blamed), gained an absolute parliamentary majority. All is fair in love and elections.

Poland's changes to court system 'endanger democracy' Read more

But its actions since coming to power are another matter. The government insists it is simply redressing an imbalance of power – in the judiciary, the civil service, the prosecutor’s office, the media. In reality, driven by resentments at what they see as the cosy consensus of the last 25 years, it is chipping away at the country’s legal foundations, as events this week have made all too clear.

The Venice Commission, an expert advisory body of the 47-member Council of Europe, will on Friday agree its verdict on Poland’s proposed changes to the country’s constitutional court.

The usually cautious body looks set to be scathing in its analysis. A leaked draft concludes: “Not only is the rule of law in danger, but so are democracy and human rights.”

In a situation where the government has rushed legislation through parliament and sworn in new judges in the middle of the night, in defiance of the constitutional court’s own rulings, it seems hard to disagree. For Kaczyński, however, the expert opinion – which the government itself requested – is “legally absurd”.

Head-on confrontation with those who voice concerns about developments has become a Polish signature tune, at home and abroad.

The interior minister accused the constitutional court of “ignoring the law” – by which he meant that the court, the ultimate interpreter of the law, was ready to take decisions in defiance of the government’s wishes, as it again did this week. In January, the justice minister instructed a worried Brussels not to exert pressure on “the sovereign Republic of Poland”. The European Commission responded by announcing an unprecedented investigation. It is expected to report back this month – presumably influenced by Warsaw’s middle-finger responses. Kaczyński declared: “We will not be a colony.”

The conspiracy theorists who have taken over Poland Read more

Poland is not of course alone in raising red flags with its political defiance. The EU is grappling with how to confront changes in Viktor Orbán’s Hungary, while in Slovakia the far right made a powerful showing in Sunday’s elections.

But Poland is in some respects the most important test case of all. It has a population of almost 40 million, and a key geopolitical role. It will host a Nato summit in July, where the difficult relationship with Vladimir Putin’s Russia will be high on the agenda. For Europe and the world, a strong and politically intelligent Poland is key.

Historically Poles have good reason to feel they received a raw deal from others. There are many scarcely buried resentments, which Law and Justice eagerly stokes today.

Barely 20 years after independence from imperial powers was restored in 1918, Poland was again carved up under the terms of the Molotov-Ribbentrop pact; Russian and German troops shook hands at the dividing line. Millions of Polish civilians were murdered in the next few years.

In 1945, even as the majority of Germans benefited from democracy and prosperity in the years to come, Moscow imposed a one-party system that Poland, on the “winning” side, suffered under for four decades.

In short: the country has good reason to be sensitive about trampled sovereignty. All the above issues are vividly remembered. As importantly, however – though the new government, scratching at sores, likes to ignore this truth – those nightmares lie in the past. In the meantime, Poland has achieved extraordinary things.

Living in Poland in 1980, I saw how Solidarity – a mass opposition movement, supported by millions of Poles – gained legal status against unimaginable odds. In 1989, I reported on partly free elections where Solidarity (officially banned in 1981) won by a landslide. Five months later, partly because of those historic changes, the Berlin Wall fell. The past quarter-century has brought changes that once seemed unthinkable. Poland became a player in the European Union, and achieved strong economic growth. Above all, it seemed close to achieving the stability that had eluded the country for so many years.

Now, though, those who voice concerns about basic rights are again “traitors”, as in the communist era. A new law allows uncontrolled surveillance, and many Poles talk – for the first time since the secret-police era – of a routine assumption that their phones may be bugged.

Lech Wałęsa: I was not an agent of the Polish security services Read more

The new media law allows for government involvement in public broadcasting, with obvious results. TV news does not reach the depths of the old-style propaganda, even after the purging of many presenters. But there is remarkable distortion – on themes ranging from opposition protests to allegations of collaboration by Lech Wałęsa, Solidarity’s founding leader (evidence suggests Wałęsa agreed to collaborate with secret police for a few years in the 1970s; his dalliance receives copious additional spin, to ensure that Solidarity’s original heroes are dethroned). At a recent protest in Warsaw, many marchers wore badges that declared them to be the “worst sort of Pole” – echoing a phrase used by Kaczyński for those who dared to criticise his party’s policies. (There are precedents. In the communist era, pro-democracy protesters were described as “anti-socialist elements”. That became a popular badge, too.)

It is still easy, especially outside the cities, to find voters who believe that Law and Justice is a welcome change – not least because of its generous promised child benefit provisions, which is a huge issue. “The protesters are just unhappy that their side lost,” said one voter in Lublin, in eastern Poland. “Why can’t they wait a few years, till the next elections?”

It is dangerous, however, if Kaczyński and his allies seek to neuter the courts or bolster “patriotism” and intolerant elements of the church, while failing to protect minorities. External moves to shore up the rule of law do not weaken Poland’s sovereignty, despite what Kaczyński and his allies may argue. On the contrary: the EU can help ensure that a strong, tolerant, rights-respecting Poland can play an important role in Europe, and the world.