AT FIRST sight it seems utterly confusing. Even as the outside world was digesting the deal between the Ukrainian regime and the protesters, and the unexpectedly helpful role of Russia in the European Union’s mediation efforts, everything changed. President Viktor Yanukovych fled the capital, Kiev, for an unknown destination. The riot police and other security guards vanished from the streets. Protesters who only hours earlier had been dodging sniper bullets found themselves guarding the presidential palace and other government buildings. Now big questions are burning holes in policymakers’ desks.

First, what happened to Mr Yanukovych? The most likely explanation is that he simply lost his nerve. He had promised Vladimir Putin that he would deal with the protesters, as part-price of the deal to salvage the Ukrainian economy with loans and cheap gas, rather than accepting the EU’s reform-for-cash deal. He was willing to dip his hands in blood. But not deep enough. Faced with the protesters’ resistance, and the splintering of his own camp, he broke and fled.

One reason is that the deal brokered by the EU involved early presidential elections. That would be a fatal blow to his presidential authority. Whatever Ukrainians think about the EU, history, language and economic reform, the detestation of Mr Yanukovych’s authoritarian, corrupt and incompetent rule is all but universal. He was able to win the last presidential election only as a result of the spectacular failure of the country’s previous “Orange” rulers. As the likely loser in December (or earlier) he would be a lame-duck president.

Already, on the day of the talks, Mr Yanukovych had lost his parliamentary majority. His grip on the country was slipping. His Russian allies had signalled their desire for a deal, not a showdown. Even a substantial and resilient figure would have quailed in such a situation. For a man of notoriously limited mental and emotional resources, it must have seemed overwhelming.

The second question is why the security forces stood down with such remarkable speed and comprehensiveness, within 45 minutes of the deal being signed. Was that a gesture of goodwill by the regime? Was it because the power ministries scented Mr Yanukovych’s exit and feared retribution from the protesters? Or is it part of a “Plan B” from the Yanukovych camp? Their top man may be gone, but their huge financial interests remain. Their ties with Russia are deep. They may have decided that the best thing for now is to retreat in the hope that the opposition will be unable to control its radical fringe. For now, Ukrainians and the West want change more than stability. But looting and mayhem in Kiev and elsewhere might change that, making it possible for elements of the old regime (and their Russian friends) to stage a comeback.

The third question is: Who runs the country now? A BBC correspondent said on Saturday morning that “power is lying on the street in Kiev—the question is who will pick it up”. That is a bit of an exaggeration. Parliament is in charge. That is better than nothing, though Ukraine’s Rada is a motley crew: many legislators have struggled to dispel the suspicion that their political careers have been an extension of their business interests.

An interim government will be formed imminently, with some “babysitting” from the EU (a special envoy is likely to be nominated soon, and more foreign ministers and other bigwigs will be packing their bags for Kiev). America has signalled that it will support emergency IMF intervention.

But keeping Ukraine afloat will be a major task. Will the Russian bail-out package, which had been drip-feeding cash to the Yanukovych regime, now be withdrawn? What will the gas price be? The West will find that supporting a large, heavily indebted country in the throes of a chaotic political transformation is a costly business (though far less costly, it should be noted, than dealing with that country’s disintegration and civil war). Will the EU now have the guts to say clearly that when Ukraine reaches the right standards, it has a real chance and choice of membership?

And what of the oligarchs? People such as Rinat Akhmetov and Viktor Pinchuk have made clear their distaste for Mr Yanukovych’s sticky-fingered approach and for his failed crackdown, and for Russia’s asset grabs. But what do they want now? Presumably they and the old regime’s cronies will now be haggling over who gets what in the new order. And what about Yulia Timoshenko, a politician whose erratic and idiosyncratic rule is responsible for much of the mess that Ukraine is now in? In struggles over billions of dollars, clean outcomes are unlikely.

Equally uncertain is how the protesters will cope with the messy tedium of normal democratic politics. Once you have gained a taste for adrenaline-flavoured simplicity, it can become addictive. Ukraine needs a decade of hard work on reform to recover the chances squandered in the past 25 years, building the institutions, habits and attitudes needed for honest, lawful government. That will require patience and expertise, not courage and barricades.

Then there is the question of Russia’s role. Many have blamed Russia for escalating the crisis, forcing Mr Yanukovych into a corner, and insisting on seeing Ukraine’s future as a zero-sum game, in which any integration with the EU means a defeat for Russia’s geopolitical interests.

So why did Russia back off? The swaggering bombast of recent days has vanished. It sent to the talks one of the few figures in Russian public life likely to be acceptable to the protesters and the West—the human-rights ombudsman Vladimir Lukin. He came as a witness, not as a participant to the deal reached on Friday; Russia says through diplomatic channels that though it is not a party to that agreement, it will not sabotage it. The Kremlin seems to have stood down its separatists in Crimea, a stronghold of Russian interests (and home to a large Russian naval base). Does it prize Ukrainian territorial integrity more than the chance to meddle?

One explanation is that Mr Putin, not for the first time, misread the situation. The Orange Revolution of 2004-5 was sparked by Mr Yanukovych’s election-rigging—enthusiastically supported and advised by Russia. Perhaps the Kremlin had been fooled by its own propaganda, in which the protesters were merely a unrepresentative bunch of Western-financed anarchists and fascists. Perhaps it was worried by the prospect of chaos in its largest European neighbour. In the event of collapse or upheaval, refugees would be heading north as well as west.

Perhaps too it was impressed by the West’s belated but impressive intervention. As the crisis deepened, America stepped up its engagement notably, with lengthy phone calls from Vice-President Joe Biden to Mr Yanukovch, and from President Barack Obama to Mr Putin. The three EU foreign ministers, Radek Sikorski of Poland, Frank-Walter Steinmeier of Germany and Laurent Fabius of France, were Europe's diplomatic equivalent to a carrier battle group of the US Navy. Mr Putin may have realised that the outside world was blaming him, not the West, for meddling in Ukraine. At the very least it was time for a tactical retreat.

But what will Russia do now? Most likely it will sit on the sidelines for a while. It can leave the West to try to manage the deal it has brokered. It will take years before Ukraine’s economy and public administration are strong enough to withstand Kremlin mischief. That gives plenty of time. Some would say that even the presence of the sensible and sympathetic Mr Lukin as a witness to the deal has established something of a precedent for formal Russian involvement in Ukrainian domestic affairs.

These are troubling questions and it would be naïve to say that the future looks sunny. Yet it is worth noting that the outlook this weekend is hugely brighter than at any time for months. Mr Yanukovych, one of the worst European leaders in decades, is down. Russia, at least for now, is out. We don't know who is in. But it might even be possible to argue that the high tide of the Putinist revanche was reached in Kiev last week, and that it is now in retreat.