During the 1980s, Polish and Czech dissidents would occasionally meet in the Tatra mountains straddling their countries. There, they would discuss ways to introduce human and civil rights to this part of communist-rule Europe.

This hard-core, dedicated group of dissidents, led by Jacek Kuroń and Adam Michnik from Poland and Václav Havel and Jiří Dienstbier from what was then Czechoslovakia, also talked about rejoining a Europe that was whole, free, and united. They achieved their goals after 1989. But nearly three decades later, the leaders of Hungary and Poland and the recently reelected president of the Czech Republic, Miloš Zeman, are challenging the liberal democratic values that these countries aspired to when they lived under the one-party system.

The election of U.S. President Donald Trump and Brexit have inspired Jarosław Kaczyński, the leader of Poland’s nationalist-conservative Law and Justice Party, and Hungarian Prime Minister Viktor Orbán. Trump’s “America First” mantra and Brexit’s “Take Back Control” slogan resonate in Warsaw and Budapest—less so in Prague and Bratislava. Both Kaczyński and Orbán (for different reasons) want to take power back from Brussels, even though opinion polls show overwhelming popular support for the European Union.

Taking back power is not about leaving the EU. It is about Warsaw and Budapest “reclaiming” their sovereignty, albeit in very different ways. Orbán’s grip on his governing Fidesz party has allowed him to accrue immense power, something he has been doing since the early 1990s when he left behind his dissident credentials.

Kaczyński’s grip on Law and Justice is about Poland trying to shape its own political agenda, which is based largely on a nationalist and Catholic platform in opposition to the urban, liberal, intellectual elites. The opposition in both countries, including nongovernmental organizations and independent media, are routinely demonized, to say the least.

Until 2004, when the countries of Central Europe joined the EU, their political agendas were heavily influenced if not set by Brussels. During the enlargement negotiations, these countries signed up to the EU’s liberal project and a constitutional setup that was firmly based on the separation of powers that included an independent judiciary and the rule of law. That liberal project now seems in jeopardy in Central Europe. It is also under tremendous strain in other member states. But in Western Europe, with few exceptions (such as Austria), there is no far-right party in government. Democracy and liberalism have not been decoupled. The same cannot be said for Poland and Hungary. The question is why?

The communist legacy but also the legacy of enlargement both play a role. “Anti-politics” motivated Solidarity in Poland and Charter 77 in Czechoslovakia into resisting the communist monopoly on power. Their staunch opposition to the communist regime allowed them the chance to create broad and diverse platforms. The common enemy—communism—was a sufficient galvanizing and unifying factor for these movements.

That fragile unity quickly fractured during the 1990s as dissidents turned to the difficult task of creating democratic politics. Old rivalries and divisions resurfaced in Poland between the different wings of Solidarity and in Hungary between liberals, nationalists, and urbanists. There were conflicts about the pace of the economic and political transformation, about privatization, and about how to deal with the communist past. Nevertheless, joining the EU remained their goal.

And with some exceptions—notably by the former Czech president Václav Klaus, who was a consistent Euroskeptic—Central European countries embraced integration. But support for that project has rapidly waned in recent years.

In its place, Kaczyński and Orbán have together called for a “counter-revolution.” In practice, both are challenging the liberal elites that drove the post-1989 era and the way in which the enlargement negotiations were conducted. Their challenge and appeal to nationalist and identity politics has been made all the easier by the refugee crisis and globalization. Trump and Brexiteers, who oppose migration and criticize multilateralism, have added grist to their mills.

Yet Central Europe is not unique. Mainstream parties across the EU are under pressure from populism. The liberal elites have yet to provide answers to these movements. They also have to find ways to channel the substantial support that continues to exist in Central Europe for the EU. Harnessing that support at the local level—with civil society, town-hall meetings, and reaching out to schools—might be a start. But it’s not the solution to overcoming Europe’s crisis of liberal democracy.