I happened to be in Bratislava, the capital of Slovakia, just a couple of days before a political miracle. A 45-year old woman, Zuzana Caputova, a European-minded environmentalist, was elected president. She beat the candidate of the ruling party Smer-SD, Maros Sefcovic, the energy commissioner of the European Union.

The significance of Caputova’s victory is that an independent candidate, with no political experience, broke through the wall of nationalism built up in the past few years around the so-called Visegrad Group, led by the illiberal democracy of Hungarian Prime Minister Orban. This is the group that with an obstreperous campaign against the redistribution of migrants has challenged the European Union and the values of multilateralism that are extolled by Germany and other members of the Union. And now, from little Slovakia, a member of that group, comes the extraordinary message of a courageous woman, a lawyer by training, a divorcee with two children, who made a name for herself by pledging to work for a more efficient and independent system of justice and the protection of the environment. Caputova started her career by stopping a project for the development of a huge landfill near her birthplace, Pezinok. She was also a most visible leader of the demonstrations over the brutal killing of the anti-corruption journalist Jan Kuciak and his fiancé. Kuciak was getting ready to publish an indictment of the ties existing between Slovakian politicians and the local mafia.

The first words uttered by President-elect Caputova are lapidary: “My success shows that it is possible not to yield to populism” while it is possible to obtain the trust of the people without resorting to “an aggressive lexicon and personal attacks.” Her political message extends to pledges made to help the elderly and to reform justice in order “to deprive state attorneys and the police of any political influence.”

Realistically, the position of president in Slovakia does not carry the political heft of the premiership that is in the hands of the Smer-SD Premier Peter Pellegrini. Although it would be risky to read Caputova’s election as proof of an inversion of the tendency within the European Union, much less inside the Visegrad Group, the result of the Slovakian election is encouraging because it comes two months before the European parliamentary elections that are the target of the national-populist forces. There is fear that the sovereignists and the populists – entrenched in Poland, Hungary, Czech Republic and Slovakia, members of the Visegrad Group — may advance not only in Eastern Europe but also in Northern Europe, Austria and Slovenia, not to mention Italy that is governed (so to speak) by a flamboyant assortment of sovereign league partners. Even in France, the leadership of Emmanuel Macron is in the crosshairs of the ultra populists of Madame Le Pen.

Slovakia is a small country and it does not send many deputies to the European Parliament. It has a population of 5.48 million and its capital city, Bratislava, counts just 462,000 inhabitants. Bratislava, however, is a city with a much larger history than its size, since it was the capital of the Kingdom of Hungary from 1536 to 1783. Today, it is a charming city that has recycled itself into an archetypal Old Europe icon. It has the distinction of featuring vast pedestrian zones, with an astonishing density of coffee shops and beer joints. Its beer is rated among the best in Europe.

The roots of Bratislava can be traced back to the ninth century state of Moravia. Later, the Slovaks became part of the Hungarian kingdom where they remained for the next 1,000 years. At the end of World War I which brought the collapse of the Habsburg monarchy, the Slovakians joined the Czechs to form Czechoslovakia, with help from U.S. President Wilson. Then came the Munich Agreement of 1938, when Hitler appropriated the Bohemian, Moravian and Czech Silesian lands.

In February 1948, the Soviets engineered a coup d’état and Czechoslovakia was declared a people’s democracy. In 1960, the Czechoslovakian Socialist Republic was proclaimed. In 1968 came the moment of Alexander Dubčec, a Slovak reformer who carried the reform movement in the direction of liberalism. The “Prague spring” did not last long as on Aug. 21, 1968, the troops of the Warsaw Pact invaded Czechoslovakia. A period of harsh repression followed but the fire of freedom was ready to burst out of the ashes. In March 1988, the first large anti-communist demonstrations were held in Bratislava. A year later, the communist party collapsed. It all happened with astonishing quickness. By then, the Berlin wall had fallen. The first free elections since 1946 took place in June 1990. After communism, the next arrangement to go was the union of Czechs and Slovaks. On Jan. 1, 1993, the “velvet divorce” generated the new Slovakia. The resurrected state quickly embraced democratic rule and the market economy. Its citizens resorted to paints and brushes to clean up the buildings that had become dark and sooty under communism.

In our day, Bratislava has regained its moniker of “the beauty of the Danube.” And a beauty it is, a city where walking is a true pleasure, along narrow cobblestone streets and in the wide expanse of squares and parks. Quirky statues adorn the city streets. The most curious of them is that of a worker emerging from a manhole in the old town. People discuss why he is there. Is he looking up women’s skirts?

The tourists who flow in increasing numbers to Slovakia may not fully appreciate the most remarkable thing about this small country in the heart of Europe, the success that it had in preserving its own language and distinct culture. The new president Zuzana Caputova will hold a post that is largely ceremonial, but she will have important resources at her disposal: the power to pick the prime minister, to appoint constitutional judges and to veto laws. In Brussels and European capitals, and surely in Washington as well, they are keeping their fingers crossed. Her pro-European stance will produce a test of wills with the pro-Russian government after she takes office next June. Under her presidency, there is hope that Slovakia may finally become a liberal democracy, free from the grasp of the Visograd autocrats.

Marino de Medici is a Winchester resident and formerly the dean of foreign correspondents in the United States.