As this article goes to press, it remains uncertain who will emerge the winner of Ukraine's presidential election. The official tally favored Prime Minister Viktor Yanukovich by 3 percentage points, but momentum is with opposition candidate Viktor Yushchenko, whom exit polls showed to be the actual winner. All credible electoral monitors denounced the vote as fraudulent, as did even one election commission official.

Tens of thousands of Yushchenko supporters remain mobilized on the streets of Kiev. The Ukrainian parliament has swung behind Yushchenko, the Supreme Court has annulled the election and called for a new vote, some of the prime minister's supporters have defected, and the guys with the guns have sent mixed signals about whether they would obey orders to repress the demonstrators.

Yet, the ancien régime has not given up. Pro-Yanukovich governors in eastern Ukraine have threatened to secede, and the lame duck president, Leonid Kuchma, is trying to secure constitutional amendments that would weaken presidential power as a condition of allowing a new election. If the stalemate drags on, the demonstrators' mood could shift, towards either radicalism or disappointment.

Whoever wins, Russian president Vladimir Putin is a clear loser. No matter what the endgame, Putin has suffered a serious setback because of the way he tried to deal with his most important neighbor. Putin's behavior has weakened Russia's influence in strategic Ukraine and damaged the Russian president's reputation in the West. It should call into question the Bush administration's embrace of the Kremlin leader.

Putin fancies himself a foreign policy pragmatist, adept at defending Russian national interests in a rational, dispassionate manner. In Ukraine, however, he has been exposed as a leader still driven by outdated ideological constructs like "spheres of influence" and "East versus West." The result is Putin's greatest foreign policy disaster since he took office four years ago.

In Ukraine, Putin made his first aggressive attempt to consolidate "managed democracy"--his advisers' term for Russia's new regime-type-- in another country. Hoping to prevent a democratic breakthrough like those in Serbia in 2000 and Georgia in 2003, Putin's administration orchestrated a giant effort, first to aid Yanukovich's electoral campaign, then after the vote to blur the world's understanding of the results. (Kuchma's own government needed no technical assistance from Russia to carry out the actual fraud--adding votes to precincts, some of which then reported 100 percent turnout, with over 90 percent voting for Yanukovich.)

Campaign consultants tied to the Kremlin set up shop in Kiev, millions of Russian rubles poured into the Yanukovich war chest, and Putin personally visited Ukraine twice to campaign for the prime minister. On Election Day, Russia sent its own observer mission, which pronounced--surprise, surprise--the vote free and fair. Putin congratulated Yanukovich on his victory well before the official results were released.

But this effort was all for nothing. Putin's advisers accurately foresaw that Yushchenko and his supporters would protest the stolen election, and they expected some perfunctory criticism from mid-level diplomats in the West. But they also calculated that Ukrainian protesters would eventually go home to escape the cold. And they reasoned that the West, especially the Bush administration, would soon forget about the fraud, as more important issues like the war on terrorism resumed their rightful place at center stage.

Putin's advisers were wrong, about both Ukrainian democrats and Western leaders. The opposition had prepared for this moment for years. Within hours of the announcement of the fraudulent results, Yushchenko supporters were pouring into the streets, ready to stay for the long haul. Then, as if in concert, every democratic government in the world refused to recognize the result. Secretary of State Colin Powell stated categorically, "We cannot accept this result as legitimate because it does not meet international standards and because there has not been an investigation of the numerous and credible reports of fraud and abuse."

Now that Putin's attempt to wield "soft power" in Ukraine has backfired, there are no good outcomes for Russia.

If Yushchenko eventually becomes president, the setback for Putin is obvious. Remember, the candidate for whom Putin aggressively campaigned has a criminal record (robbery and assault) and is closely tied to corrupt oligarchic networks in the southeastern city of Donetsk, whose surrogates tried to poison Yushchenko to get him out of the race. After Putin's intervention, a President Yushchenko would have every right to adopt anti-Russian policies.

It did not have to be this way. If Putin had been motivated by Russian national interests alone, he would not have invested his personal reputation in a candidate as unattractive and corrupt as Yanukovich. He would have stayed on the sidelines during the campaign, reached out to the winner after the vote, and mediated national reconciliation.

In that scenario, Yushchenko would have bent over backwards to meet with Putin and prove to ethnic Russians in eastern Ukraine that he was a uniter, not a divider. Putin might have been able to guarantee Kuchma's retirement somewhere in Russia (useful, since Kuchma has been accused of ordering the murder of Ukrainian journalist Georgy Gongadze), and he might even have secured a commitment from Yushchenko to make Russian a second official language in Ukraine.

In addition, before the radicalizing events of the fall campaign, Yushchenko was more likely to have been friendly to Russian investors in Ukraine, in contrast with Prime Minister Yanukovich, who has made money for himself and his cronies by keeping economic competitors out of Donetsk. Putin's blunders during the election make a cooperative relationship less likely now.

In the wake of last week's events, a Yanukovich victory would be no triumph for Russian foreign policy. If Yanukovich or someone from his camp manages to become Ukraine's next leader, he will spend his entire term trying to hold the country together and avoid civil war. Ukraine will stand in the same relation to Russia that Poland did to the Soviet Union during the Cold War--an ally in name, an oppressed and hostile society in reality.

So Putin loses either way. At this stage, only a major strategic mistake by Yushchenko and the opposition--a spontaneous eruption of violence in downtown Kiev or the adoption of a new, strident position in the negotiations underway to defuse the crisis--could offer Putin a face-saving exit.

Paradoxically, democracy in Ukraine is strengthened when an American "ally"--Russia--pursues a misbegotten foreign policy. Putin not only had the wrong objective in Ukraine, he also proved unable to construct a strategy for achieving it. Is this really the kind of partner President Bush should cultivate? As Bush assembles his new foreign policy team for the second term, perhaps it's time to reassess his Russia policy.

When he first came to office, President Bush made a strategic decision to develop a personal relationship with Putin as a means to achieve important foreign policy goals. Before September 11, what was important to Bush was national missile defense, which required, for diplomatic reasons, Putin's acquiescence to the abrogation of the Anti-Ballistic Missile treaty. Thanks to his rapport with Putin, Bush got what he wanted. That's good diplomacy.

For a while, the close bond between the two also served American interests in the aftermath of September 11. Putin sided unequivocally with the United States in the war on terror and provided real assistance to the U.S. military intervention in Afghanistan.

Since Afghanistan, however, it is difficult to identify any American foreign policy objectives that Putin has helped us to achieve. The Russian president is not much of an asset in fighting the global war on terror. Putin's ruthless and unsuccessful war against Chechnya, where the death toll of well over 100,000 in the last decade has reached genocidal proportions, has not defeated Islamic radicals, but inspired them. Nor is Putin a champion of American nonproliferation efforts, especially in places like Iran, where Russians continue to build a nuclear reactor and transfer nuclear know-how, despite overwhelming evidence that Iran has been hiding a secret nuclear weapons program for years.

But Putin does most harm to Bush's foreign policy agenda precisely in situations like the crisis in Ukraine, where Putin is actively undermining democracy. Since September 11, Bush has made the promotion of liberty abroad one of the central pillars of his foreign policy. After his reelection, he has the opportunity to make his liberty doctrine his greatest foreign policy legacy.

To date, the Bush administration's response to events in Ukraine has served that legacy well. Bush officials have rejected Moscow's attempt to frame the crisis as a struggle between East and West, insisting instead that the battle is between supporters and foes of democracy. But Ukraine also shows the difficulty of maintaining the fiction that Bush's promotion of democracy in Ukraine is compatible with his indifference to autocracy in Russia.

The moment is ripe for a new approach to Putin and Putin's Russia. On issues of nonproliferation, antiterrorism, and ending regional conflicts in the states of the former Soviet Union, the U.S. government still has real business to do with the government of Russia. State-to-state cooperation, facilitated by personal ties between our presidents, must not only continue, but grow.

In parallel and at the same time, however, Bush must develop a real strategy for bringing his message of liberty to Russia. Bush should be able to work constructively with his Kremlin counterpart without having to check his values at the door. This dual-track diplomacy, which worked so well for Ronald Reagan in dealing with his Kremlin counterparts (even before Gorbachev came to power), must be attempted again.

On that score, Ukraine offers several lessons.

First, words matter. The demonstrators on the streets of Kiev cheered when they heard Colin Powell's hard-hitting message rejecting the results of the presidential vote. Speaking the truth about democratic rollback inside Russia will similarly inspire the democrats there.

Second, a united Western voice matters. The United States and Europe both strongly denounced the fraudulent elections in Ukraine. Had a major European leader defected and reached out to Yanukovich, the West's positive influence in this crisis would have been greatly diminished. A common Western message about the seriousness of Putin's antidemocratic policies currently does not exist. It should.

Third, assistance matters. European and American support for Ukrainian civil society helped election monitors, exit pollsters, and independent journalists who told the truth about the fraudulent vote. In turn, this has inspired democrats in Kiev, London, Kharkiv, and Paris to stand firm. Rather than cutting funds earmarked for democracy-building and educational exchanges with Russia, the Bush administration should expand those programs dramatically.

Finally, the pull of the West matters. Most Ukrainians want to live in a normal, prosperous, and boring Europe. To bring Ukraine into such a community, they fully understand that democratic consolidation is a precondition, while reversion to autocracy would doom them to pariah status like Belarus, the last full-blown dictatorship in Europe. Similar incentives for reform must be offered to the Russians, most of whom also want to live in a normal, prosperous, boring country considered part of Europe. In this sense, the eastern border of Europe, whether defined as NATO or the European Union, can never be finally fixed.

Russian democrats face a far greater challenge today than does the opposition in Ukraine. But as they press their long and difficult struggle, first to stop and then to reverse the establishment of authoritarian rule in Russia, they should at least know that we are on their side.