AfD top candidates Alexander Gauland and Alice Weidel celebrate with their supporters during the election party 'Alternative for Germany' in Berlin, Germany, on Sunday, September 24, 2017Martin Meissner / AP

Angela Merkel may have secured a historic fourth term as chancellor of Germany on Sunday, but her victory was blunted by an unprecedented showing from the Alternative für Deutschland (AfD), the country’s far-right populist party, which now becomes the third-strongest party in the Bundestag, with 12.6 percent of the vote. It dominated the narrative on election night as the first far-right party to enter Germany’s national parliament since the 1950s.

At the AfD’s election party in Berlin on Sunday night, Alexander Gauland and Alice Weidel, the party’s co-leading candidates, offered a preview of the kind of rhetoric that their supporters can expect in the Bundestag. Weidel wasted no time taking aim at Merkel, vowing to launch a parliamentary investigation into the chancellor’s open-door policy that has led to hundreds of thousands of refugees entering Germany since 2015, even though Merkel has taken a more hardline stance on immigration since. “Dear friends, now that we’re obviously the third-biggest power … the government has to buckle up. We will hunt them. We will hunt Frau Merkel,” Gauland told supporters. “And we will reclaim our country and our people.”

But less than 24 hours after the AfD’s historic performance, the party’s fractures revealed themselves. On Monday, party co-chair Frauke Petry's long-simmering tensions with other leaders came to a head when she abruptly walked out of a press conference and said she would not join the AfD's parliamentary caucus. “I’ve decided I won’t be part of the AfD’s group in the German parliament but will initially be an individual member of parliament in the lower house,” she said. In a Facebook post, she thanked her supporters and said there would need to be “good pragmatic solutions” long before Germany’s next federal election in 2021 to shift the majorities away from the main parties and to a “reliable and truly conservative policy.” Other AfD leaders said they were surprised by Petry’s announcement, and sought to downplay her exit. “It’s always a shame when someone very talented leaves the party and Frauke Petry is very talented. But I must note that she wasn’t much help recently in the campaign,” Gauland told Reuters on Monday. Weidel called on Petry to renounce her party membership.

While Petry’s surprise departure was a distraction, it’s unlikely to dispel the euphoria of the party’s big night. The AfD’s strong performance shook Germany and Europe as the two major centrist parties—the Christian Democratic Union (CDU) and Bavarian sister party Christian Social Union (CSU), which make up Merkel’s conservative bloc, and the center-left Social Democrats (SPD)—dropped in the polls since the 2013 federal election. The AfD, which ran on an anti-immigration, anti-Islam platform, netted 94 seats in the Bundestag, which will give it and its nationalist agenda new visibility. In the end, the AfD’s fortunes were buoyed by the fact that the centrists parties lost support, especially with a large bloc of voters still undecided in the final week of the campaign. Coupled with the anti-establishment fervor, the party was able to maintain the anti-immigrant fervor that has bubbled up since the refugee crisis.

After the surprising results of the U.S. presidential election, Britain’s Brexit vote, and high-profile elections in France and the Netherlands with far-right candidates, the world watched to see if Germany could dodge the wave of right-wing populism sweeping Europe. Even without an influx of refugees streaming into the country, the AfD managed to keep up its momentum and the anger that fuels its appeal. Controversial and anti-Semitic comments from some AfD leaders would spark a national outcry and, at times, even divided the party. Yet, the AfD began gaining in the polls again in the lead-up to election day, and political observers predicted the party would pick up around 70 seats at most.

On election day, the AfD mobilized non-voters and siphoned off voters who’ve supported the two main centrist parties, including one million voters who previously backed Merkel’s CDU-CSU bloc. The AfD was powered by voters from formerly communist east German states, where it captured about 21.6 percent, according to polling institute Infratest dimap in Berlin. But 60 percent of those who voted for the AfD said they did so as a protest vote instead of an alignment on policies.

Petry’s split from the AfD is the latest iteration of the infighting that has plagued the party. She took over as it lurched further right, capitalizing on the 2015 refugee crisis. Yet, she also attempted to steer it in a more mainstream direction so that it could one day join a governing coalition. But her realpolitik strategy failed to catch on, and her efforts to broaden the party’s appeal put her at odds with other leaders like Gauland, who replaced her as a co-leading candidate. While the party surged on the strength of its anti-immigrant positions, it started to fade earlier this year after Merkel brought the refugee crisis under control. But in the final week of the federal election, the AfD appeared to bounce back again with double digits in the polls.

Even though the AfD’s power will be limited, the election results triggered impromptu anti-AfD demonstrations in a handful of major cities around the country. In Berlin, hundreds of protesters gathered outside of where the AfD held its election-night party, chanting slogans like, “Nazis out!” and “Racism is not an alternative.” And during the “Elephants’ Roundtable” where leaders from the parties traditionally participate following the release of election results, the AfD was confronted directly by The Left party's chair Katja Kipping and the party leaders sparred over the classification of the AfD's views as far-right.

The problem for Germany’s mainstream parties lies in understanding how to win back their voters. While the AfD and other smaller parties made gains in their vote shares, the two main centrist parties, Merkel's conservative bloc and the SPD, bled support. Merkel’s conservative bloc got 33 percent, down from the 41.5 percent in 2013 and her party’s worst result since 1949. And the SPD languished in the low 20s with the party’s lowest results in post-war history. The Bundestag will now expand to include seven parties with a record of 709 seats.

The AfD's influence, however, would be limited since Merkel has ruled out forming a coalition with them. And it seems unlikely that the AfD will be the largest opposition party: The SPD’s Martin Schulz has ruled out another “grand coalition” with Merkel's conservatives, saying his Social Democrats will take the helm of the opposition. That would leave Merkel with only one other realistic coalition: teaming up with the business-friendly Free Democrats (FDP) and environmentalists Greens in what is called a “Jamaica” coalition. (The coalition name is based off of the colors of the three parties, which are also the colors of Jamaica’s flag). The two smaller parties appear open to a governing coalition with Merkel, but negotiations are expected to run long, especially with the differing list of demands that typically pit the FDP and Greens against one another.

Meanwhile, the AfD received its fair share of praise and congratulatory messages even from those abroad. Over social media, far-right leaders across Europe, including Marine Le Pen, leader of France’s National Front and Geert Wilders, leader of the Netherlands's Dutch Party for Freedom, congratulated the AfD’s third-place finish and praised Petry’s leadership. For now, then, right-wing populists across the continent will celebrate.

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