The text of this post was updated and expanded on May 8. It appears in the June 5, 2014 issue of The New York Review.

As the first heavy fighting began in eastern Ukraine in early May, with an attempt by Ukrainian forces to retake the town of Sloviansk, and as violent clashes spread elsewhere, including Odessa, in the country’s southwest, there has been a growing sense that a larger confrontation, one that could involve Russia and the West, may be unavoidable. Such a perception is a terrible mistake. There is nothing inevitable about the future course of the conflict. It is absolutely essential for Western governments to focus on what they can do to avoid war, preserve democracy, and keep Ukraine united.

What they cannot do is help the government in Kiev to win with military force in the east. The rebel forces that have taken control of cities of the Donbas, the largely Russian-speaking industrial and mining region in the east, appear well organized, have much local popular support, and are implicitly backed by the 40,000 Russian troops deployed to the Ukrainian border. It would take many months—probably many years—for Ukrainian forces to reach sufficient strength to retake the Donbas swiftly and relatively bloodlessly, or to defeat a Russian invasion of the east and south of the country. Moves to raise Ukrainian nationalist volunteer forces should be strongly discouraged by the West. The intervention of such groups would risk repeating what has just happened in Odessa, where dozens of people were killed in street battles on May 2. It would make a Russian invasion a certainty.

And the West itself will not fight for Ukraine. All the blowhard posturing of US and European government officials cannot hide this essential fact. In these circumstances, to give the unelected interim government in Kiev the idea that we support it with military backing is irresponsible, immoral, and contemptible. Did we really learn nothing from the experience of Georgia in 2008? For that matter, did we learn nothing on the playground at the age of six?

If Ukrainian forces continue their assault on rebel strongholds in eastern Ukraine, then only three things can happen, separately or in sequence: they will be beaten back with the help of Russian weaponry, which has so far been used to shoot down three Ukrainian helicopters at Sloviansk; they will retake one or two towns, after which Russia will reinforce other towns with lightly disguised Russian special forces, making their capture much harder; and if Ukrainian forces resort to heavy weaponry to blast the rebels from their positions, Russia will invade. The only question then will be where the Russian army will stop: whether Moscow would be content to hold the Donbas, as it previously held South Ossetia and Abkhazia as quasi-independent statelets formally still part of Georgia, or whether it would go on to seize half of Ukraine.

What is truly strange and terrible about this looming disaster is that all the leading players already know and agree about what the only solution can be, even if they disagree on the details and the timing: a federal Ukraine with elected regional governments and robust protection for regional interests. This, not further separation, is what Moscow is proposing; and this is what the Ukrainian interim president, Olexander Turchynov, has publicly hinted at for the Donbas. Although the rebels in Donetsk and other eastern cities have declared the Donetsk Republic, many easterners, too, have indicated that they want some kind of federalization and not independence or annexation to Russia. As interviews published in The New York Times on May 4 make clear, even some rebel commanders themselves hope to keep Ukraine united.

It is extremely important to note that regional autonomy—accompanied by a threat of independence—is what the government of the western region of Lviv, controlled by Ukrainian nationalists, declared for itself back in February, when it seemed that President Viktor Yanukovych would remain in power and take Ukraine into the Russian-dominated Eurasian Union. If Lviv could demand this as insurance for its identity and interests when the national government was going in a direction it did not like, it is very hard to argue that Donetsk does not have the right to do the same. Nor is there any moral reason why the West cannot support federalization. The United States, Germany, Canada, and half a dozen other Western democracies are all federal states. Of course, we all know that a fundamental moral principle of Western foreign policy is that sauce for the goose can never under any circumstances be sauce for the gander—but to oppose a federal solution for Ukraine on such grounds is ridiculous.

Indeed, a constitutional solution to the crisis has already been supported by all sides—including Russia, the US, and Ukraine—in the Geneva Declaration of April 17, which called for Ukrainians from all parts of the country to disarm and take part in a national dialogue that would recognize regional interests. The problem with Geneva is that it did not set out an outline of the constitutional settlement—which will have to be agreed to in advance before the rebel militias in eastern Ukraine will put down their weapons. There is also of course profound disagreement on the process by which constitutional change should be introduced, and how much regional autonomy should be granted.

President Turchynov suggested a referendum on autonomy for the Donbas to accompany the new presidential election planned for May 25; but on May 6, the Kiev government announced that the referendum on autonomy would be delayed until after the presidential election, and there is a question whether the presidential election can take place on schedule, or before peace is restored. Nor, given the precedent in Lviv and the current protests elsewhere in Ukraine, can a case be made for a special status for the Donbas region alone. Far better to have an equal federation across the whole territory of Ukraine. (As for Crimea, we will have to content ourselves with formal statements to the effect that we regard Crimea as still legally part of Ukraine, while in practice making Crimea the subject of separate processes and talks—rather as with the northern Cyprus issue in the past. Unfortunately, if we make a peace process in Ukraine conditional on Russia giving up Crimea, there will be no peace process.)

National and regional elections under a constitution agreed to by all parties are the only way of giving ultimate power over their local affairs to the people of eastern Ukraine, and taking it away from the pro-Russian gunmen who have seized control of much of the region, and from the Russian government. By contrast, for Kiev to continue its military offensive may only empower the pro-Russian gunmen, the Ukrainian ultranationalist militias, the separatists—and Vladimir Putin.

Reality and the long experience offered by such conflicts show that agreement on a new federal constitution for the country as a whole must be reached first, and ratified by a national referendum. The rebel militias in eastern Ukraine and the camp of demonstrators on the Maidan in Kiev should both agree not to use force and not to disrupt such a solution—since clearly neither regional nor national democracy is possible if governments have to submit for approval to unelected crowds. Elections for the presidency, parliament, regional assemblies, and regional governorships can then be scheduled to take place simultaneously later in the year. Ideally, some kind of observer force would need to be put in place with backing from the United Nations and the Organization for Security and Cooperation in Europe ( OSCE ) to report on compliance by all sides.

Throughout this process, Ukrainian forces must continue to hold their positions at airfields and military bases in eastern Ukraine. This will prevent a repetition of the experience of Crimea, where Russia was able to disarm and expel Ukrainian forces. To do this, Russia would have to send in its own army to attack the Ukrainians—something that it is clearly unwilling to do, and that would of course bring all negotiations to an end. The continued presence of Ukrainian forces in eastern Ukraine will be a guarantee that under a new federal constitution, the region will remain a constituent part of Ukraine—without the appalling risks (indeed, the near certainty of defeat and complete secession) that stem from the Ukrainian army attacking the local militias in their urban strongholds.

Since the tragic killings in Odessa, it is no longer possible to deny that the Ukrainian crisis involves a serious threat from extreme nationalist groups as well as pro-Russian ones—and some of the extreme nationalists are sitting in the present interim government in Kiev. On the other hand, Russia undoubtedly has armed local allies in eastern Ukraine, which it has strengthened with some disguised Russian officers. But the masses of civilians who have blocked the path of Ukrainian troops in the Donbas show that the rebels also enjoy a very considerable measure of local support.

What all this reveals is something that should have been blindingly obvious ever since Ukraine became independent in 1991 and that is deeply rooted in Ukrainian history: Ukraine contains different identities, and cannot be ruled unilaterally by one of them alone, or pulled in a single geopolitical direction, without risking the breakup of the country itself. The huge demonstrations in Kiev this winter showed that Yanukovych’s and Moscow’s hope of taking Ukraine into the Eurasian Union was impossible, because many Ukrainians would literally give their lives to prevent it.

Now, events in the east and in Odessa make clear that a Ukrainian state that defines itself purely in pro-Western and anti-Russian terms is also out of the question, because a great many Ukrainians will not tolerate this either. In these circumstances, it is no good for one side to hope for absolute victory. When Russia tried for this with Yanukovych, the result was a fiasco, which among other things destroyed Russia’s influence over Ukraine as a whole. The West is now risking an even greater failure in the opposite direction.

Critics of federalization say that it would allow Russia to block Ukrainian moves toward NATO and the EU. What is surely apparent, however, is that Moscow and its allies in Ukraine have already done this. The goal of the West must be to get all the opposing forces in Ukraine off the streets and back within a legitimate democratic process that is recognized by a majority of Ukrainians, and that will allow the possibility of economic and political reforms by democratic means. Time is short. We saw again and again, in the Balkans, the Caucasus, and elsewhere in the 1990s, that once fighting begins, previously possible solutions quickly become impossible. This would be a tragedy—Ukraine does not need to be Yugoslavia or Georgia.

Contrary to what is said in much of the Western media, most of Russia’s allies in eastern Ukraine are not separatists. Rather, what many in the Donbas fear is that a government in Kiev—one that is either unelected or elected by a small majority, and that is under the sway of extreme nationalist demonstrators—will be able to decide their fate unilaterally. Thus they are deeply opposed to the interim government in Kiev, but many of them continue to envision being a part of a federal Ukraine in which they would have greater autonomy and recognition of regional rights and interests, rather than full independence. Until now, every opinion poll and election in the east has also suggested this.

But once a few hundred people have been killed, this reasonable position will quickly be destroyed. To return power to a reasonable majority, the international community must put forward the outline of a constitutional settlement on which a majority of Ukrainians can agree. It is hopeless to expect that the opposing sides themselves will be able to abide by a compromise proposal on their own, without outside help.

Germany, as the Western country with the greatest influence on Russia, will be crucial to any solution. The German government has indeed called strongly for a resumption of the Geneva talks with Russia, but it has also insisted that the presidential elections take place as scheduled on May 25. This is both impractical and hard to envisage diplomatically. Instead, Berlin should adopt a strategy that calls for national and regional elections under a new constitution, and puts forward a clear plan for democratic federalism, not as Russia’s plan, but as Germany’s, and in accordance with Western democratic values. The process of adopting this constitution could then take place under UN and OSCE auspices.

Such a proposal from such a source would, I believe, be very hard for Washington, Moscow, and Kiev to reject. By acting in this way, Chancellor Angela Merkel and Foreign Minister Franz-Walter Steinmeier have the chance to go down in history as true statesmen, who compensated for some of the past disasters of German history by saving Europe from a terrible and unnecessary war.