Women ride bicycles past election posters, a day after the parliamentary election, in Raszyn.Reuters

Democracy was on the ballot yesterday in Poland. It suffered a stinging defeat that will have consequences far beyond the country’s borders.

For decades, political scientists regarded Poland as the great success story of the transition from communism to democracy. In no other large country in Central or Eastern Europe had democratic institutions taken such a deep hold, was there such a raucous press, and had civil society flourished to such a remarkable extent. According to a slew of regional experts, democracy in Poland was “consolidated”: Just as in Italy or Canada, one could count on it to remain stable for the foreseeable future.

This narrative started to come into doubt when Law and Justice, a far-right populist party, stormed into office on the heels of a government corruption scandal in 2015. The party’s leader, Jaroslaw Kaczynski, immediately started to attack the rule of law and curtail the independence of key institutions, such as the country’s public broadcasting network. As international observers from the European Parliament to Freedom House have noted, his reforms of the judiciary—designed to force independent judges into retirement and give government ministers more control over criminal investigations—amounted to a particularly grave threat to Polish democracy.

In the first years of the Law and Justice government, the country’s civil-society institutions seemed to contain some of this damage. Under pressure from mass protests, Kaczynski was forced to make a few partial yet significant concessions on judicial independence. It seemed as though Poles would not accept a restriction of their democratic rights without a fight.

But the protests waned, and the biggest opposition party struggled to find its footing. Leading up to Sunday’s elections, Kaczynski promised to go even further with his attacks on independent judges and a free media if his party was rewarded at the ballot box.

It was. Law and Justice won 44 percent of the vote, about 6 percent more than in the past elections. Its closest competitor, the center-right Civic Coalition, won 27 percent, down 5. Because the country’s electoral system gives a sizable advantage to the largest political party, Kaczynski will gain enough seats in Parliament to push through his agenda with little opposition.

As examples of many other populist governments, from nearby Hungary to faraway Venezuela, show, it is often in their second term in office that populist leaders manage to take full control, intimidating critics and eliminating rival power centers. In this election, the chances of the opposition were already somewhat restricted by a deeply hostile media environment. With the government now holding enough power to institute further anti-democratic reforms, it is likely that it will become ever harder for the opposition to do its work.

But it’s not only Poles who will suffer the repercussions. The European Union is founded on a set of shared democratic values and built on the assumption that all of its member states will (by and large) continue to adhere to them. For the past years, Hungary has stretched those presuppositions beyond the breaking point, but the continent’s leaders have treated this embarrassing fact as a mere anomaly. Now it looks as though Warsaw is slowly morphing into Budapest. Since Poland is a much larger country, with a much bigger voice within the EU, its autocratic tendencies will be much harder to shrug off. Many European citizens will start to ask themselves why they should share their sovereignty with illiberal and anti-democratic governments.

For decades, scholars have assumed that democracy is brittle in some countries, such as Ukraine and Ethiopia, but stable in others, such as Japan and Italy. Poland, according to most of these scholars, belonged in the latter—supposedly stable—category.

Sunday’s election shows that this was naive. No democracy is perfectly safe. In the age of populism, certainty about the political future is a dangerous illusion.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.