When German Chancellor Angela Merkel arrived in Dresden on October 3 to celebrate the twenty-sixth anniversary of the reunification of Germany, she was greeted with both cheers and insults. Some demonstrators shouted at her to resign, others applauded her. Security was extremely tight.

Merkel and German President Joachim Gauck, both of whom grew up in East Germany, endured the insults. Once inside the city’s beautifully restored opera house, the Semperoper, Norbert Lammert, the president of the German parliament, gave a powerful speech about defending values. He spoke about why Germans and Europeans should remain open to those who need protection.

Merkel’s decision to give such protection and safety to hundreds of thousands of refugees fleeing the wars in Syria and Iraq has exposed a Europe that is now being torn between two competing agendas. The one that prevails will have a lasting consequence for Europe’s ability to act strategically.

The German chancellor represents one agenda. Viktor Orbán, the prime minister of Hungary, represents the other. Their respective reactions to the refugee crisis have defined their positions. Those reactions have also exposed the fragility of EU institutions as well as the lack of confidence of EU and national leaders.

Merkel’s agenda is an open one. Her decision to grant refuge to so many people was based on moral and humanitarian reasons. As a German but also a European, Merkel could no longer endure a Europe that did not open its doors to those escaping the suffering meted out day by day in Syria.

However, Merkel is paying a political price for her policies, as opponents not only in Germany but also in other European countries win increasing support for a closed Europe. They blame the chancellor for the growing rise of populist and anti-immigrant movements across Europe, even for the June 23 referendum decision by the British to leave the EU. The message from populist leaders is that national governments, not the EU, can determine Europe’s future.

That is Orbán’s agenda, probably even more so after he failed to achieve the required 50 percent turnout in a referendum on October 2. Voters had been asked to support or reject an EU relocation plan in which each member state would take in a share of migrants. Over 99 percent of the 3.3 million Hungarians who voted wanted to stop any mandatory relocation scheme. But the turnout was not enough to make the referendum binding. Orbán brushed aside that issue. He said he would in any case “change the constitution [to] reflect the will of the people. We will make Brussels understand that it cannot ignore the will of Hungarian voters.”

It is still unclear in what way Orbán intends to change the constitution. What is clear is that he risks putting his country on a major collision course not only with the EU—as if relations were not strained enough already—but also with EU law as enshrined in the Lisbon Treaty, which Hungary and all other member states ratified. In essence, Orbán’s agenda is becoming an increasingly national one that potentially challenges EU law.

The EU treaty is also about solidarity, as Merkel, Gauck, and Lammert repeatedly mention. It is easy to denigrate that word. Yet it was the principle of solidarity that brought Greece, Portugal, and Spain into the EU in the 1980s. Without that pull factor, there would have been no guarantee that this part of Southern Europe would have become stable and democratic.

Furthermore, it was the geostrategic aspect of solidarity that was later extended to the Baltic states, to Central and Eastern Europe, and to the Balkan countries of Bulgaria and Romania. As these nations joined the EU, this sense of European solidarity helped complete the reunification of the continent. It was about bringing freedom and democracy and peace to a wider Europe.

Merkel’s agenda is about using this solidarity to keep Europe together but also to remind Europeans how hard it was to build this European edifice and how hard it is to retain that sense of solidarity. Orbán’s agenda seems to downplay—if not ignore—how far Hungary has come since the barbed-wire fence that snaked along the border between Hungary and Austria was literally cut open with pliers in 1989.

Orbán, a former dissident who was denied a passport by Hungary’s former Communist regime, has now built a new fence between Hungary and Serbia to keep refugees from entering the country, even for transit purposes.

Putting up new barriers is but a short-term response to a crisis that affects all EU countries. It does not equip the EU to deal with the extraordinary challenges it now faces, from the refugee crisis and Brexit to the growing gulf in the transatlantic relationship. That is why Merkel’s agenda, expressed best on October 3 by Lammert, is for Germany and Europe to remain open to the world. Failing that, Europe—and with it, European solidarity—will become irrelevant.