Ukraine entered uncharted political waters on Monday after near final results showed a comedian with no political experience and few detailed policies had dramatically up-ended the status quo and won the country's presidential election by a landslide.
The emphatic victory of Volodymyr Zelenskiy, 41, is a bitter blow for incumbent Petro Poroshenko who tried to rally Ukrainians around the flag by casting himself as a bulwark against Russian aggression and a champion of Ukrainian identity.
With 95 percent of votes counted, Zelenskiy had won 73 percent of the vote with Poroshenko winning just under 25 percent, the central election commission said.
Zelenskiy, who plays a fictitious president in a popular TV series, is now poised to take over the leadership of a country on the frontline of the West's standoff with Russia following Moscow's annexation of Crimea and support for a pro-Russian insurgency in eastern Ukraine.
Declaring victory at his campaign headquarters to emotional supporters on Sunday night, Zelenskiy promised he would not let the Ukrainian people down.
"I'm not yet officially the president, but as a citizen of Ukraine, I can say to all countries in the post-Soviet Union look at us. Anything is possible!"
Zelenskiy, whose victory fits a pattern of anti-establishment figures unseating incumbents in Europe and further afield, has promised to end the war in the eastern Donbass region and to root out corruption amid widespread dismay over rising prices and sliding living standards.
But he has been coy about exactly how he plans to achieve all that and investors want reassurances that he will accelerate reforms needed to attract foreign investment and keep the country in an International Monetary Fund programme.
"Since there is complete uncertainty about the economic policy of the person who will become president, we simply don't know what is going to happen and that worries the financial community," said Serhiy Fursa, an investment banker at Dragon Capital in Kiev.
The United States, the European Union and Russia will be closely watching Zelenskiy's foreign policy pronouncements to see if and how he might try to end the war against pro-Russian separatists that has killed some 13,000 people.
US President Donald Trump phoned Zelenskiy and pledged to support Ukraine's territorial integrity, while European Council President Donald Tusk congratulated the Ukrainian people on what he called a show of democratic maturity.
Zelenskiy said on Sunday he planned to continue European-backed talks with Russia on a so far largely unimplemented peace deal and would try to free Ukrainians imprisoned in Russia, which is holding 24 Ukrainian sailors among others.
Russian Prime Minister Dmitry Medvedev, who only last week signed a decree limiting exports of some Russian coal, crude oil and oil products to Ukraine, said Moscow and Kiev now had a chance to improve what he called their destroyed economic relationship, but said he was not harbouring any illusions that it would necessarily happen.
Writing on social media, Medvedev asked what was needed to achieve better relations between the two countries. "Honesty. And pragmatism and a responsible approach," he said.
Zelenskiy has pledged to keep Ukraine on a pro-Western course, but has sounded less emphatic than Poroshenko about possible plans for the country of 42 million people to one day join the European Union and NATO.
Poroshenko, who conceded defeat but said he planned to stay in politics, said on social media he thought Zelenskiy's win would spark celebrations in the Kremlin, which has yet to comment on the comedian's victory.
Critics accuse Zelenskiy of having an unhealthily close working relationship with a powerful oligarch called Ihor Kolomoisky, whose TV channel broadcasts his comedy shows.
Zelenskiy has rejected those accusations and promised not to be unduly influenced by Kolomoisky.
One of the most important and early tests of that promise will be the fate of PrivatBank, Ukraine's largest lender, which was nationalised in 2016.
The government wrested PrivatBank from Kolomoisky as part of a banking system clean-up backed by the IMF, which supports Ukraine with a multi-billion dollar loan programme.
But its fate hangs in the balance after a Kiev court ruled days before the election that the change of PrivatBank's ownership was illegal.
Zelenskiy has repeatedly denied he would seek to hand PrivatBank back to Kolomoisky if elected or help the businessman win compensation for the ownership change.
The IMF will be watching closely too to see if Zelenskiy will allow gas prices to rise to market levels, an IMF demand but a politically sensitive issue and one Zelenskiy has been vague about.
Zelenskiy's unorthodox campaign traded on the character he plays in the TV show, a scrupulously honest schoolteacher who becomes president by accident after an expletive-ridden rant about corruption goes viral.
He has promised to fight corruption, a message that has resonated with Ukrainians fed up with the status quo in a country that is one of Europe's poorest nearly three decades after breaking away from the Soviet Union.