Among the most ancient institutions in the world of Western democracy is the Social Democratic Party of Germany (SPD). The history of the party—which was banned in the 19th century by Bismarck and in the 20th by Hitler—is also the history of the long struggle for a stable system of self-government east of the Rhine. With the announcement February 7 of a new coalition agreement between the SPD and Chancellor Angela Merkel’s conservatives, the SPD looks set to return to government. But this week’s headlines obscure the deep conflicts within the party, and the dangers German democracy faces today.

German political life is in a disorderly state thanks to the rise of the extreme right. The nationalist Alternative for Germany (AfD) received nearly 13 percent of the vote in last September’s elections, and the country has been without a government ever since. You could tell the story of these four months without saying much about the AfD, and many commentators have tried. But the truth is that the far right is the specter haunting German politics today.

Merkel’s party, the Christian Democrats (CDU), allied with their Bavarian sister party, the even more conservative Christian Social Union (CSU), were the nominal winners of the September elections. They got 32.9 percent of the vote, while the pro-business Free Democrats (FDP) got 10.7 percent. Added to the AfD’s 12.6 percent, a clear majority of German voters—56.2 percent—chose to take the country rightward. But since none of the mainstream parties would enter a coalition with the AfD, the CDU/CSU and the FDP decided to try for a coalition with the Green Party, which had won 8.9 percent. (Germans call this a “Jamaica coalition” because the colors of the parties—black, yellow, and green—are the same as those of the Jamaican flag.)

The Jamaica talks collapsed in November, in large part because the FDP and CSU—afraid they would lose even more voters to the far right—wanted tougher restrictions on refugees than the Greens would accept. On that crucial issue, at least, the shadow of the AfD, even though the party wasn’t in the talks at all, seemed to define what was possible, and what was politically just too dangerous.

The SPD was the clear loser of the elections, managing a score of only 20.5 percent—its worst result since before World War II. The SPD leader and candidate for chancellor, Martin Schulz, insisted throughout the fall that his party would not join the government this time, having just spent the past four years in a “grand coalition” with Merkel’s conservatives. But once the Jamaica talks failed, Schulz changed his mind. Here, too, the AfD—technically shut out by all the other parties—played a crucial role, because if the SPD did not agree to go back into government, and Merkel could form no other coalition, there might be new elections. The SPD would then face the catastrophic possibility of being surpassed by the AfD. (In the main tracking poll released February 6, the AfD was at 15 percent and the SPD at only 17 percent; other recent polls show a wider gap—between five and seven points, but still uncomfortably close.)

Schulz’s decision to pursue a new coalition with Merkel was popular with governments around Europe and with journalists and business leaders who have come to believe reflexively that Germany needs a facade of stability, preferably with Angela Merkel standing in front of it, regardless of what is really going on. But the decision was very unpopular with the SPD’s left wing, and particularly with its youth organization, the Jusos (short for Young Socialists), who are fed up with governing as the junior partner to Merkel. The Jusos and their leader, 28-year-old Kevin Kühnert, declared war on the idea of another grand coalition, and the stage was set for a dramatic showdown at a special convention of 600 party leaders who met in Bonn on January 21 to decide whether to approve formal talks with the CDU and CSU. It would be up to Schulz and his allies to convince the convention; otherwise, no talks.

This so-called “special party convention” was unlike anything you’ll ever see in American politics. SPD leaders from around Germany debated—on television, for about four hours—a major question bearing on the fate of the party and the country, followed by a binding vote, the outcome of which was not foreordained and had been the subject of intense speculation around Europe all week. Should the SPD go back into a governing coalition with Merkel, clinging to power in order to tilt a mostly conservative government slightly leftward? Or should it instead lead the opposition, where it might be better able to stop the rising far-right tide?

The stakes were high, but the debate felt informal and freewheeling, refreshingly and even inspiringly honest and unpackaged. There was no pageantry, just a long line of delegates—local party activists no one had ever heard of next to household names like cabinet ministers and former candidates for chancellor—walking up to a podium to tell the country where they thought things were headed.

It was an admirable display of democratic possibility, but not an easy exercise for party leaders to control. Dickens had David Copperfield wonder whether he would be the hero of his own life story. If Martin Schulz was wondering whether he would be the hero of his own party’s convention, the answer turned out to be no. For my money, that role was shared by Annika Klose, the chair of Jusos Berlin, and Andrea Nahles, the leader of the SPD caucus in the Bundestag (and the first woman to hold that position). Klose and Nahles represented opposing sides in the debate (respectively, against and for coalition talks), and they seemed better able than any other speakers to channel the powerful emotions that are coursing through the SPD right now.

As the convention opened, Schulz, a former bookstore owner who was dressed conservatively in a business suit and tie, pleaded for compromise with Merkel in an hour-long speech that the audience received with applause that one would describe charitably as polite, or, more realistically, as grudging. Then Klose, who is all of 25 years old and was dressed casually, came on stage right after Schulz and riled the crowd into frenzied cheers with an impassioned plea for the delegates to reject everything the party leader had just said.

As Klose listed some of the policies the young leftists want but fear they’ll never actually get in a coalition with the conservatives, including rent control and equal reimbursement for people on public and private health plans, the convention started to come to life. The (male) editor of the Berlin paper Die Welt am Sonntag live-tweeted that “a very excited girl from Jusos” was “getting more applause than Martin Schulz,” which provided the day with its obligatory gender-political tumult on social media. (Things only got worse when the newspaperman posted a screenshot from a dictionary in an attempt to defend his use of the word “girl” to describe the accomplished and impressive Klose.)

Klose, who has posted videos of herself working on a boat in the Mediterranean trying to save refugees, is nothing if not idealistic. The history of electoral politics gives us vanishingly few examples of young idealists who don’t believe that victory is imminent if only they could just take their case to the voters one more time. As Klose put it, “I’m not afraid of new elections…[where we] ring at the door and say to the people: ‘It’s not about us. It’s not about holding office or just staying in power. It’s about you!’”

Regardless of Klose’s enthusiasm for canvassing, a full 15 percent of Germany’s union workers voted for the AfD in September, a fact that was undoubtedly somewhere in Andrea Nahles’s mind as she got up to deliver a major smackdown to those who would risk new elections now. “You know what the voters are going to say? They’re going to say ‘You’re crazy!’” Nahles thundered, reminding the convention that there is “no social or parliamentary majority” for a left politics in Germany right now.

Dressed in a dark blue pantsuit, white blouse, and black sneakers (I did say the event felt informal), Nahles delivered an epic barnburner in the classic style—speaking without any notes, employing a dynamic range from slightly below mezzo-piano to well north of fortissimo, slapping the podium with both hands, shaking her fist, stabbing the air with her forefinger, leaning sideways with one forearm completely on the podium and the other arm sweeping out toward the audience. Basically, it was the kind of speech one still hears in countries where raising money by telephone is not the main requirement for being a politician.

Nahles commanded the delegates to remember that you’ve got to “see what’s big in little things,” which is essentially the argument made since the beginning of time by every party leader faced with an insurgent base. But her oratory was so inspired that she made incremental change seem adventurous. The rhetorical fireworks probably swayed enough delegates to carry the day for the party leadership. The headline in Stern—“Nahles Saves Schulz’s Ass”—summed up the view of the German press. But the margin, 56 percent to 44 percent, was actually a narrow victory for this kind of affair.

Besides, the game is still not over, because the entire SPD membership has to approve the final coalition agreement through a mail-in vote—and the Jusos are not giving up. They’ve been trying to recruit as many new members as possible who will vote no. Anyone who joined the party by February 6 will be allowed to participate; it was announced at the deadline that more than 24,000 new members had signed up since the first of the year, bringing the total SPD membership to 463,000.

Especially since some of the new members will vote yes, it seems unlikely that the Jusos’ #NoGroKo campaign (“GroKo” stands for grosse Koalition, or grand coalition) will succeed. But you never know. The youthful coalition opponents are fired up, and they are fighting against a party leadership whose case comes down to the idea that, sometimes, you just have to know when to settle. As Schulz put it, quoting former SPD leader and president of Germany Johannes Rau: “It’s better to get 1 percent of something than 100 percent of nothing.” Or, in the less chipper language of Ecclesiastes, “A live dog is better than a dead lion.” Which is hard to dispute, but even harder to get excited by.

Many SPD members, and not only among the Jusos, feel they’ve been settling for far too long. Gerhard Schröder, in office from 1998 to 2005, was the last SPD chancellor, and he insisted on major cuts to welfare, unemployment insurance, and pensions as part of the “reform” package known as Agenda 2010. The goal was to reduce Germany’s then persistently high unemployment rate by forcing people into low-wage work. This was successful but unpopular. Germany now has something it hasn’t had in a very long time: a large and growing population of working poor. Over the past 20 years, wages have stagnated for more than 40 percent of the German labor force, according to a report by the Economics Ministry. Meanwhile, the country is sitting on budget surpluses at the federal level and in almost every state, as well as a large trade surplus. This is what investors call “the Merkel boom,” but with booms like this, you don’t need any recessions.

Both mainstream political camps in Germany have lost supporters to the fringes and to apathy, but the turn to neoliberalism has been particularly demoralizing for the SPD, which has lost more than half its members since 1990.

The fact is that the SPD has never really recovered from the disorientation that occurred during the Schröder years. It is now mostly forgotten that in the 2005 elections—which brought Angela Merkel to power in the first place—German voters had actually given a majority to parties on the left. But back then, Schröder’s SPD ruled out any coalition with the post-Communist Left Party, in part because it would have required a repudiation of Agenda 2010. Instead, Merkel took office as chancellor and started out by thanking Schröder for the “courage” of his neoliberal reforms. The SPD has since dropped its categorical opposition to a coalition with the Left Party, but now the votes are no longer there.

Ironically, it is Andrea Nahles who understands all this as well as anyone in Germany. She was a leader of the internal opposition to Agenda 2010 during the Schröder years. Today, in the prime of her career, not infrequently mentioned as a possible future chancellor and now slated to replace Schulz as party leader, she faces a wrecked political landscape shaped by actions her own party took but that she herself opposed. During the coalition talks she and the rest of the SPD leadership demanded (and won) stricter regulations on short-term job contracts—which were first made legal by none other than the Schröder government. From the point of view of an ordinary German voter, the Social Democrats were for neoliberalism before they were against it.

The SPD’s damaged brand on economic issues has made its defense of refugees and its stance in favor of immigration and cultural change seem all the more treacherous politically. Some voices on the left—although not at this point among officeholders—have been raised in favor of a much less refugee-friendly line. Joachim Gauck, a former president of Germany, gave a much-discussed lecture last week at the Heinrich Heine University in Düsseldorf in which he said that the evolution of multiculturalism in Germany had “terrified” him. While emphasizing that intolerance and discrimination are wrong, Gauck also argued that reflexive condemnation of those who raise questions about Islamic cultural practices is feeding the right-wing notion that political correctness has destroyed freedom of opinion in Germany. Of course, Gauck, who is a respected elder statesman on the left side of the political spectrum, could have used his platform to argue that right-wing propaganda about freedom of opinion should be rejected. Instead, he implicitly endorsed it.

The journalist Jakob Augstein was even more direct in a recent column for Der Spiegel. Augstein argued that the AfD is indeed on its way to surpassing the SPD as the representative of workers, because “elites” had pushed cultural liberalism while selling out the economic interests of “the little people.” Although this question is obviously being asked by center-left parties the world over, it would be hard to find a more provocative formulation of it than Augstein’s: “Why didn’t they say: ‘We don’t want gay marriage until there are also fair wages. We don’t want equal rights for women as long as there are also people on temporary job contracts’?”

Markus Decker, in the left-leaning Frankfurter Rundschau, even called for Germany to establish a special commission to investigate what has gone wrong with democracy in a society riven by identity-related conflicts. The commission would be empowered to make policy recommendations, and if it decided that too many refugees endanger German democracy, then “the refugee-friendly part of the population will have to live with that.”

These statements all speak to an unusually profound nervousness among many observers in Germany today. If the SPD membership approves a new coalition with the CDU/CSU, then the AfD will be the largest opposition party in the Bundestag. With the SPD tied to the conservative economic policies of its coalition partners, and forced by large parts of its own base to advocate a liberal immigration policy, the AfD will be well positioned to claim an ever-larger share of disillusioned voters. This is why the most fitting headline about Germany’s new coalition agreement was the pithy two-word summary in the conservative Frankfurter Allgemeine: “Stable Instability.”