Greece's newly-appointed Prime Minister Alexis Tsipras looks on during a meeting at the radical leftist Syriza party headquarters in Athens January 26, 2015. (Alkis Konstantinidis/Reuters)

OVER THE past half-decade, one-quarter of Greece’s gross domestic product has simply disappeared, the largest such five-year peacetime economic contraction since the one that hit former Soviet republics in the 1990s. So it would have been a surprise if the Greek electorate had not voted into power the far-left Syriza party — a gaggle of ex-communists and other perennial outsiders allied, improbably, with a right-wing national party — or some similarly demagogic movement sooner or later. People can absorb only so much ruin before punishing the political establishment that presided over it.

Can the political fire in Greece be contained before it spreads to the rest of Europe? In Greece’s fellow debtor nations, populists feed off resentment of the austerity wealthy nations have imposed in return for financial bailouts. In Germany, meanwhile, Chancellor Angela Merkel is under pressure from those, including a new anti-euro party, who think she has too generously deployed their tax money to shore up Europe’s profligates. As Europe’s de facto financial power broker, Ms. Merkel cannot drive too hard a bargain with Athens, lest she precipitate a highly risky exit from the common European currency; nor can she capitulate to Syriza’s demands for debt forgiveness, lest other countries vote in similar parties.

The good news is that Europe’s admittedly modest recent progress toward debt reduction and regional financial integration creates an opportunity for all sides to show more flexibility. The Irish, Portuguese and Spanish economies have bottomed out and resumed growth; even Greece is doing better, with forecasters expecting a budget surplus (not including interest payments) equal to 4.1 percent of GDP and growth of nearly 3 percent. Meanwhile, the European Central Bank, bucking the Germans, has agreed to a massive bond-buying program, which should ease, if not eliminate, the deflation that cripples Europe’s debtor nations.

The trick now is to adopt policies that make Europe’s creditors and debtors partners in fact as well as in rhetoric. For Greece, relief in the form of stretched-out payments and the like is relatively easily arranged, since 90 percent of its $268 billion public debt is now in the hands of governments and multilateral institutions rather than of private bondholders. Ms. Merkel should be willing to provide that to the new Greek prime minister, Alexis Tsipras — as long as he doesn’t insist on spending the additional liquidity by puffing up Greece’s state payroll, as he sometimes suggested on the campaign trail.

Mr. Tsipras is untested politically and might be more pragmatic than his campaign suggested; for all his bluster, he lacks leverage against Germany. If he is willing to embrace a plausible growth strategy that relies more on the private sector, Ms. Merkel could respond creatively by stretching out payments and facilitating the sale of discounted Greek bonds to private investors for conversion into shares of Greek firms, property and banks. Debt-for-equity swaps, first proposed by international economist Barry Eichengreen, could help align the incentives of Europe’s debtors and creditors, helping convert what is now a politically polarizing economic dynamic into something more unifying. And isn’t unity what the European Union is supposed to be about?