UKRAINE ON Monday appeared to be teetering between a violent government crackdown and the political negotiations that are the only solution to its ongoing crisis. While President Viktor Yanukovych said he would take up an offer by three former Ukrainian presidents to negotiate an end to his standoff with a mass protest movement, he also dispatched riot police to confront encampments in the center of Kiev, the capital, and security forces to raid the headquarters of the main opposition party.

The threat of force prompted a timely phone call to Mr. Yanukovych from Vice President Biden, who said violence would be “incompatible” with the “strategic relationship” between Ukraine and the United States. Senior European Union and U.S. officials will be in Kiev on Tuesday; they should make clear to the Ukrainian leader that the use of force will result in sanctions against his government and top officials.

Fortunately, a negotiated settlement remains strongly in the interest of both sides. Though it has mobilized hundreds of thousands in the capital and other cities, the pro-Western protest movement has no legal means to force out Mr. Yanu­kovych, who won a democratic election in 2010. The opposition represents the best of Ukraine — its rising youth and middle class — and if Europe’s largest country aligns itself with the West, the dream of a united and democratic continent would be within reach. But it’s vital that the pro-Western forces stick to peaceful and democratic tactics.

For his part, Mr. Yanukovych, who provoked the crisis by abruptly turning his back on an E.U. association agreement, still needs the West. Were he to accept Vladi­mir Putin’s demand that Ukraine join a customs union with Russia, he would provoke still greater opposition, including from his own country’s oligarchs. Repression could turn Ukraine into a 21st-century version of 1980s Poland, isolated from the free world.

Then there are Ukraine’s critical financial problems, the result of years of economic mismanagement. According to Mr. Yanukovych’s prime minister, the government needs $10 billion in financing next year to avoid a default on its debts and pay for imports; independent experts say the real figure is $16 billion to $18 billion. Mr. Putin can give Ukraine a break on its gas import bills and debts to Russian banks, but it’s unlikely that Russia can finance the country by itself. Ukraine’s only path to economic stability is an agreement with the International Monetary Fund (IMF), which can provide the necessary financing if the government adopts free-market reforms.

Mr. Yanukovych has resisted those tough measures, but he could more easily adopt them if he struck a political deal with the opposition. Before Monday’s events, opposition leaders appeared open to a compromise based on replacing the prime minister and cabinet with a technocratic team empowered to reach an accord with the IMF and reopen association talks with the European Union. That wouldn’t satisfy the street protesters, but their energy could and should be channeled into a campaign to defeat the president in the next election.

Mr. Yanukovych probably is being encouraged by the Kremlin to launch a crackdown. Ukrainians can only hope that the contrary influence of their former presidents, Western envoys and the youth in the streets will tip him toward a more rational course.