Before Angela Merkel decided to welcome more than a million asylum seekers to Germany in 2015, the German conservative coalition she belongs to spent years insisting that “Germany is not an immigration country.” When Merkel’s Christian Democrats fought to restrict the right to asylum in 1993, for example, their Bavarian sister party the Christian Social Union (CSU) one-upped by suggesting that Germany abolish the right to asylum altogether and introduce a state-granted privilege in its stead.

Sunday’s state elections in Bavaria showed how much the country has changed since then. For nearly six decades, the CSU has ruled Bavaria under the mantra that no party should exist to its political right. Paradoxically, this concern about right-wing extremists often served as an excuse for the CSU to adopt a very right-wing agenda.

But with the rise of the intensely nationalist, anti-immigration Alternative für Deutschland, the political landscape has shifted, demanding ever-greater contortions from conservatives eager to keep their voters. This year, the CSU party’s electoral campaign to win over voters flirting with the far right backfired—it was the pro-refugee Green Party which came second in the exit polls and helped cost the CSU its absolute majority, the AfD also gaining seats in the Bavarian parliament for the first time. And the results, possibly alongside the U.S. midterms in November, may soon become an object lesson in the challenges facing traditional conservative parties in the new populist right-wing environment.

Coopting the far right’s agenda is no longer the political panacea it once was.

Bavarian Prime Minister Markus Söder of the CSU spent a lot of his summer chatting about “asylum tourism” and “state failure.” He also egged on the CSU party leader Horst Seehofer to challenge Angela Merkel over a symbolic migration policy disagreement to the point that it almost ripped apart her coalition government.

All of this went down well in the beer tents, where CSU party members praised Söder for “showing Germany who is boss.” But the erratic behavior of the CSU party’s leadership this year made many Bavarians—an increasing number of whom come from other parts of Germany and the world—“embarrassed and uncomfortable,“ according Simone Egger, an assistant professor for European ethnology at the University of Munich. In Munich, thousands of people took to the streets throughout the summer to protest “the politics of fear.” Antifa teens walked with churchgoers who held up signs reading “mass instead of hate.”