KIEV - It should have been a festive spring day, when citizens who fought to overthrow their corrupt and autocratic government voted for a new president in a free and fair election. But the mood at the polls here on a warm and sunny Sunday was sober. Ukrainians feel themselves to be at war, and their hopes that their votes will revive the country are tempered.

"I'm a realist," said Katya Lapina, a 25-year-old office worker, outside a polling station in the Kiev suburbs. "I don't think after this day everything will change. It's the first step in a very long way. I just hope the future president will remember the price we spent for this."

That remains to be seen. The big winner Sunday was not the idealistic protest movement that spent the winter in Kiev's Maidan square but Petro Poroshenko, one of Ukraine's billionaire magnates. Poroshenko, who made his money producing chocolate, joined the Maidan movement and helped steer it away from violence. But he is very much a figure of Ukraine's failed past - dysfunctional governments, outsized oligarchs and epic corruption.

Thanks in no small part to Russian aggression, the oligarchs, who along with thuggish president Viktor Yanukovych were the targets of the Maidan, have emerged from the revolution stronger than ever. Three are actual or de?facto governors of eastern provinces where Russia has been fomenting armed insurrection. Two are sponsoring their own militias to push back against the pro-Moscow separatist movements. Poroshenko will take office owing those men, whose predations on the Ukrainian state did much to create the economic mess that the new government must try to clean up. He also may owe Dmytro Firtash, a shadowy figure who made a fortune brokering gas deals between Russia and Ukraine and is under a U.S. indictment for bribery. Firtash backed Poroshenko and is reported to have helped cut a deal under which one of Poroshenko's principal challengers withdrew from the presidential race (though the candidate's staff denies it). Firtash is also close to Russian President Vladimir Putin, who considers Ukrainian presidents to be his rightful vassals.

As disheartening as all this may be to Ukrainians longing for an economy and political system worthy of the European Union, it may also explain why Putin has ratcheted back his armed aggression inside Ukraine and hinted he will recognize the new government. Western diplomats and some Ukrainian analysts suspect that the Kremlin may be open to bargaining with Poroshenko, or may already be talking to him through Firtash or others. That makes the ascent of the chocolate king a hopeful prospect for the Obama administration, Germany and other European governments, who would welcome the chance to back away from confrontation with Putin.

Poroshenko talks of making Ukraine a partner of both the West and Russia, of signing an association agreement with the European Union and a free trade agreement with Moscow. He says he'll use force to clear Russian-sponsored separatist militants from the two eastern provinces where they occupy government buildings, but that he'll also move quickly on constitutional reforms that would decentralize power to those regions. "If Putin actually wants a deal," says one Western official, "he can do it with Poroshenko."

So what of the sweeping economic and political reforms that the Maidan movement demanded? Poroshenko and the cobbled-together parliamentary government with which he will share power say they are still on the agenda. It helps that a detailed road map already exists, in the form of Ukraine's agreements with the European Union and International Monetary Fund. The cabinet under Prime Minister Arseniy Yatsenyuk has already taken the first painful steps: a 56 percent increase in gas prices; 25,000 civil service layoffs; a cut in child subsidies. The corruption of the previous government was so staggering that some think big improvements could be relatively easy.

But can Poroshenko rein in the oligarchs? For years many of them have feasted on cheap energy, lucrative and opaque government procurement contracts and access to uncompetitive Russian markets. Putin could take away the latter - he has already blocked Poroshenko's chocolate sales - while the West demands reform of the rest. Past governments - Poroshenko served in three of them - invariably dodged the IMF and cut shady deals with Putin.

If there is a difference this time, it is that the people who turned out on the Maidan and at the polls Sunday are more engaged. "We have to be open and honest with people, tell them the truth and not be corrupted," Yatsenyuk's chief cabinet minister, Ostap Semerak, told a group I joined from the German Marshall Fund. "Otherwise the people will turn on us."

Jackson Diehl is the deputy editorial page editor of The Washington Post.