Ukraine’s future hangs in the balance. That is no exaggeration. At least 26 people have been killed in antigovernment protests over the past few days. Hundreds have been seriously wounded. Doctors are treating the injured in churches because they are afraid of the security forces in the hospitals. Entrances and exits to the subways are closed. There are roadblocks all over Kiev.

The demonstrations are not confined to the capital, but have spread to other big cities. Ukrainian President Viktor Yanukovych has declared his own style of martial law by introducing antiterror legislation.

The EU’s Eastern neighbor is in turmoil. Can it be pulled back from the brink? If not, the consequences will be grim—not only for Ukraine, but also for the rest of Europe and for Russia.

That is why the visit to Ukraine on February 19–20 by Radek Sikorski, the Polish foreign minister, is desperately important. He will be joined by Frank-Walter Steinmeier and Laurent Fabius, his German and French counterparts, and has the backing of Catherine Ashton, the EU’s foreign policy chief.

Sikorski is acutely aware of what is at stake. Having invested much time in trying to bring Ukraine closer to the EU through economic and political reforms, Poland now sees its neighbor going up in flames.

Warsaw is not willing to let that happen. If the two sides can find no way to end the violence and establish some kind of transitional government, Yanukovych could declare full-fledged martial law, with support from Russia. In that case, neither the EU nor the United States could remain on the sidelines any longer. Brussels and Washington are already poised to introduce a package of sanctions designed to hit Yanukovych and his entourage.

So far, attempts to find a breakthrough have come to naught. When the opposition agreed on February 17 to end its occupation of government buildings in Kiev in return for the authorities revoking criminal charges against the protesters, the compromise was short-lived. Yanukovych ordered heavily armed security forces to clear Independence Square of demonstrators. Terrible violence followed.

By February 19, Yanukovych had called for a truce. Maybe he feels he has to be seen to give diplomacy a chance. But the opposition no longer believes anything he says or does. With such distrust between the opposition and the regime, Sikorski and his colleagues face a mammoth task to find some kind of compromise that could end the standoff.

Throwing money at Ukraine is not the solution, in either the short or the long term. And it is no longer certain that a return to the 2004 constitution, which gave the president fewer powers than he has today, would satisfy the opposition. Too much blood has been spilled. Ukraine would fare much better if Yanukovych were to resign and agree to a transitional government of technocrats.

Yanukovych and Vladimir Putin, the Russian president, now face a choice. So far, Putin has not allowed Ukraine to pursue a pro-Western path, even if, in the long term, that would benefit Russia as well. The reason is that Putin sees Ukraine as his country’s bulwark against the West—while Poland and its EU neighbors see a democratic, pro-Western Ukraine as their cordon sanitaire against an increasingly authoritarian Russia.

What is more, Putin has a huge interest in keeping Yanukovych in power. If the Ukrainian president were to resign, the risk of contagion would eventually reach Russia. Putin’s own power base would become vulnerable. Putin will now have to decide what is preferable for Russia: a Ukraine divided and in flames, or a country that can find its path toward democracy and stability?

Western countries must also shift their perspective. For far too long, the West has viewed Ukraine through the prism of Russia. Imposing sanctions would change that geopolitical perspective. Punitive measures would certainly have repercussions for relations with Russia.

The EU and the United States will have to be absolutely clear about their goal: sanctions should lead to an end to the violence, then political reform. Yet there are no guarantees of success. After all, Russia’s $15 billion of loans and cheap gas aimed at propping up Yanukovych’s corrupt regime hasn’t worked. The opposition was not for sale.

Until recently, the Polish government was loath to impose sanctions on Ukraine, believing that some kind of political compromise was still possible. In Poland’s view, supporting EU sanctions would mean admitting that its long-term strategy of bringing Kiev closer to the EU has failed. And it would damage Warsaw’s gradual rapprochement with Moscow, which means so much for Poland’s sense of security and identity.

As Paweł Świeboda, president of demosEUROPA, a Warsaw-based think tank, tweeted yesterday: “Hardest moment in post-[19]89 Polish foreign policy. After years of working for EU [perspective] for Ukraine, Polish PM now leads calls for sanctions.” It will require an incredible feat by Sikorski, Steinmeier, and Fabius to change the dynamics in Kiev.