Hungary’s democracy is in mortal danger – and whether it survives will help determine the future of our embattled continent. This weekend the main opposition newspaper – think of it as a Hungarian Guardian – was closed down by its owners after six decades of existence. Its digital archive vanished from the internet; its workers were shut out of their offices and left unable to access emails.

Publicly, it is presented as a commercial decision: in Hungary’s increasingly repressive society, there is widespread private cynicism about such a claim. Here was a newspaper that dared to challenge the government – whether on policy, corruption, or its onslaught against democracy.

Authoritarian rightwing populism is sweeping the western world: Hungary is an acute example. We all know history turned a corner after the 2008 financial crisis: we are beginning to see how sharp that turn was. From the Scottish independence movement to Podemos in Spain, from Donald Trump to France’s National Front and Hungary’s far right, from the rise of Bernie Sanders and Jeremy Corbyn to Greece’s Syriza: a painful struggle for the west’s future has only just begun. Hungary’s prime minister, Viktor Orbán – whose rightwing party swept to victory in 2010 – recognises this. His chief lesson from 2008 is that “liberal democratic states can’t remain globally competitive”. He has committed his government to building an “illiberal democracy” – and he is remaining true to his word.

Rather than being repelled, a new generation is being attracted to rightwing extremism

Others have harsher descriptions. Hungarian dissident Gáspar Miklós Tamás accuses the government of “pissing on the liberal status quo” in favour of “post-fascism”.

Hungarian-British poet George Szirtes knows all about repression. His mother was a photographer, his father a senior ministry official, and they fled after the Soviet Union crushed Hungary’s revolution in 1956. “Hungarian democracy is imperilled,” he told me. “We’re moving towards a Putinesque situation.” As Human Right Watch’s Lydia Gall puts it: “What we’ve seen in the last six years is essentially a continued undermining or deterioration of the rule of law and human rights protection.”

In 2010 and 2011, Hungary adopted a series of laws which were damned by Amnesty International as “a threat to the right to freedom of expression”. Hungary’s media outlets had to register with a national authority. The Klubrádió station – a persistent critic of the government – became one of its victims. At the end of 2011, the authority decided not to grant Klubrádió a licence to broadcast, forcing it into a protracted battle – though the station did eventually win.

This authoritarian government has repeatedly amended the constitution: one change embedded discrimination against LGBT people by defining the family as a unit “based on the marriage of a man and a woman, or a linear blood relationship, or guardianship. Indeed, earlier this year Hungary blocked an EU-wide agreement to prevent discrimination against LGBT people.

Youngsters at a concert by nationalist band Romantic Violence, which followed a rally by far-right sympathisers. Photograph: Vadim Ghirda/AP

Other amendments have attacked judicial independence and religious freedoms. Key public institutions, such as the office of the prosecutor general and the constitutional court, have been de facto taken over by the ruling party. “These are institutions that should be independent checks and balances on the government,” says Gall. There is a growing atmosphere of intolerance in the country, with those who dissent being denounced as traitors and accomplices of terrorism. Worse still, one of the main opposition parties is Jobbik, an antisemitic neo-fascist party with a paramilitary wing.

Hungary’s role in Europe’s refugee crisis has been appalling, prompting Luxembourg’s foreign minister to propose the country’s expulsion for treating refugees “worse than wild animals”. Last year, the country declared a state of crisis and built a fence with the intention of driving refugees back into Serbia. People who have already fled violence are reportedly being chased by dogs and beaten.

And what has the EU done? Hungary is, after all, dependent on economic assistance from the union. Article 7 of the EU constitution exists to sanction member states in violation of its norms, including the suspension of voting rights. The European commission has made it progressively harder to invoke, and last year the European parliament threw out a proposal to invoke Article 7 – or even to activate a warning mechanism.

When Hungary’s government imposed the mass early retirement of veteran judges in favour of more pliant replacements, the EU did take action – but only on the grounds of age discrimination. Hungary was fined and forced to pay financial compensation to those sacked – but it still achieved its goal. A recent government-initiated referendum to oppose EU plans to settle refugees failed because of insufficient turnout, but it stirred up inflammatory xenophobic and racist rhetoric.

Hungary’s plight has disturbing echoes of Europe’s past: but, horrifyingly, it could foreshadow our future too. Rather than being repelled, a new generation – including the university-educated – are increasingly attracted to rightwing extremism. Poland too is in the grip of an authoritarian right which chips away at the country’s hard-won democracy. With no meaningful consequences, such governments feel increasingly emboldened. In Austria, the far right moves ever closer to power; in France, it grows stronger; in Sweden and other countries too.

The cure to such movements is a left that offers an inspiring alternative relevant to the insecurities and ambitions of the post-2008 world. We don’t have that yet. But that’s no excuse for inaction. And we in Britain cannot smugly condemn Hungary, of course: since the Brexit vote, xenophobic nationalism has marched defiantly. Our prime minister condemns her political opponents as having disdain for patriotism; this week, both the Daily Mail and the Daily Express printed chilling front pages calling for “unpatriotic Bremoaners” to be damned for a “plot to subvert the will of the British people”, and demanding “EU exit whingers” be silenced.

It is increasingly common in modern Europe for political opponents to be portrayed as unpatriotic fifth columnists. The history of our continent tells us where this can lead. Hungary is perhaps the most extreme, undiluted form of what Europe is becoming. It is a warning we should heed.