The Minsk meeting between presidents Vladimir Putin and Petro Poroshenko has produced more than a handshake. It was the two leaders’ first serious conversation. No one should have expected an immediate result from the two hours of private discussions, but they must have been useful. Separate negotiations on the terms of trade—now that Ukraine has signed an Association Agreement with the EU—and on the price for the Russian gas will follow in September, even though they will probably take several rounds to reach agreement.

War in eastern Ukraine was not formally on the agenda in Minsk, but it was of course at the top of the leaders’ minds. The armed conflict did not take a break during the Minsk meeting; it only intensified. President Poroshenko said that all parties in Minsk wanted a peaceful solution in Donbass, but of course each wanted it on its own terms. President Putin called the fighting an issue for Ukrainians, and cast Russia in the role of a facilitating party in the search for peace.

His claims of Russia’s noninterference were not helped by the recent capture of ten Russian paratroopers inside Ukraine, whose pictures were on TV screens around the world at the time of the Minsk summit. An awkward moment for Moscow, but at the end of the day, little more than a nuisance. Since last February, Vladimir Putin has felt and behaved like a wartime president, using all means available to him, short of a large-scale invasion, to prevent Ukraine from joining NATO or hosting U.S. military bases.

While everyone’s eyes in Minsk were on Putin and Poroshenko—will they shake hands? will they meet?—the meeting was unique in bringing together, for the first time, some top officials from the European Union alongside the leaders of the Eurasian Union countries (Belarus, Kazakhstan and Russia) and Ukraine. Had such a conversation taken place last year, and produced a compromise, many lives might have been saved and much damage could have been avoided.

Significantly, the trilateral dialogue in the Belarusian capital was immediately preceded by the first-ever visit to Kiev by the German chancellor. Angela Merkel was strongly advocating a cease-fire and held out a promise of a 500-million-euro-worth aid package to help Ukraine rebuild the war-ravaged Donbass. Mrs. Merkel also publicly stated that Russia’s interests should not be ignored.

Germany’s position is key to any future settlement. After the failure of European diplomacy at the early stages of the Ukraine crisis, Berlin has been playing a careful game. It is adamant that it has the support of its European allies and the United States, and will not consider an Alleingang in its relations with Moscow. Hence the support for the sanctions, which shocked the Kremlin. At the same time, Germany is determined to end the war in Ukraine as soon as possible and strongly insists on the need for a compromise.

Kiev, backed by Washington, wants a clear victory and complete rollback of the “Russian aggression”. This would point to a prolongation of the fighting, and potentially to the dangerous expansion of the conflict, involving Russian and NATO forces. Petro Poroshenko, who has just dissolved parliament and is engaged in an election campaign ahead of the October 26 national poll, is under heavy pressure to pursue a hard line, giving no quarter to the “terrorists” and those who support them.

The continuation of the war, however, takes a toll on all those involved. Ukraine’s economy is in dire straits, and its finances are crumbling. Right after the elections, winter is coming, and weathering it without Russian gas is problematic, even if Europe shares with Ukraine some of the gas it imports. Even a moderate expansion of the Ukraine conflict will probably have to involve more Western sanctions against Russia, which neither Moscow nor Berlin can welcome. Thus, there is a basis for a possible deal.

Any future settlement would probably have to include Kiev engaging in a serious political dialogue with the eastern regions, and adjusting its nation-building policies to take into account Ukraine’s diversity. Wide-ranging amnesty would be granted to the participants in the conflict. It would also need to include Russia’s acceptance of Ukraine’s European choice, and specifically its association with the EU. NATO membership for Ukraine, by contrast, would remain out of reach to Kiev—more as a result of a German veto than a product of Ukraine’s federalization. Ukraine would not become a formal federation, but the “unitary nature” of its state would allow a significant degree of decentralization, including in economic, financial and linguistic issues. At some point, Russia and Ukraine would settle for a mutually acceptable gas price, with the EU guaranteeing the gas transit across Ukraine, and the case against Gazprom would be withdrawn from the Stockholm arbitrage.

A deal along the lines described above may look too unpalatable to many people. However, the absence of any deal deemed minimally acceptable to all sides would steer Europe toward an abyss. The United States would do well to support Germany’s leadership in European security affairs. At the moment, this is the best option.

This article originally appeared in the National Interest.