Still, the next steps are rife with dangers. Under a transitional political arrangement, victor and loser will have to rule jointly for most of the next year, and Georgia still has to find its place between the West and Russia, with which it fought a short, nasty war in 2008. 

Mr. Saakashvili will remain president for almost a year as Bidzina Ivanishvili’s victorious Georgian Dream coalition takes over the Parliament, with Mr. Ivanishvili most likely becoming the prime minister. Next October, a new constitution will come into force, devolving many powers of the president to the prime minister. 

Until then, both men will have to somehow overcome the scars of a vicious campaign in a culture not given to compromise. Even in his gracious concession of defeat, Mr. Saakashvili noted that “we believe that their views are extremely wrong.” And Mr. Ivanishvili called on Mr. Saakashvili to resign, but later withdrew his demand. 

Another challenge for the new government will be to lower tensions with Russia without abandoning its Western ambitions. Mr. Saakashvili, who took an unabashedly pro-Western stance, was completely spurned by Moscow, especially after the brief Russian-Georgian war. Russian boycotts of Georgian wine and other products have hurt the Georgians, while Russia’s recognition of the independence claims of two Georgian regions, Abkhazia and South Ossetia, remains a deep wound. 

Mr. Ivanishvili, who made a huge fortune in Russia, was little known even to Georgians before he plunged into politics a year ago, and remains something of an enigma. He promises to improve relations with Russia, and also says he will continue to pursue membership in NATO. 

During the campaign, Washington wisely avoided taking sides. The United States and the European Union must continue giving the Georgians every incentive to build their democracy and to take their place in Western institutions. But overt interference can only create unnecessary tensions and suspicions. 

Russia expressed hope that the election would help restore “constructive and respectful relations.” For Russia, that would mean lifting economic pressures and acknowledging that Georgia has its own hopes and dreams.