Russian President Vladimir Putin has been waging one of the most furious diplomatic battles of his career to keep Ukraine from signing an historic deal with the European Union.
But Ukrainian President Viktor Yanukovych's sacking of his trusted prime minister in the face of two months of protests over his decision to keep closer ties with Russia now raises the prospect of the pro-EU opposition coming to head the government.
The sudden reversal of fortunes in Kiev puts the Russian leader's seeming victory in doubt. Here is a closer look at what rests behind Putin's fierce determination to keep Ukraine in the Kremlin's orbit.
The Russian leader has made the formation of an economic alliance of ex-Soviet nations that could rival the European Union one of the defining goals of his 14-year rule.
Most analysts believe that Putin's dream will shatter unless his bloc also includes Ukraine -- a nation of 46 million with a strong industrial and agricultural base. Such membership would be impossible should Kiev and Brussels strike their own free trade deal.
"Putin's economic union idea is much less serious without Ukraine," noted Maria Lipman of the Carnegie Moscow Centre.
Putin viewed Yanukovych as a pro-Russian ally when he recognised his victory in disputed 2004 elections that were annulled after weeks of protests that became known as the pro-democracy Orange Revolution.
Yanukovych has since shown a more independent streak that appears to take the views of Ukraine's powerful billionaire tycoons into account as much as those of Moscow.
But Yanukovych has ultimately tied himself to the Kremlin by ditching the EU agreement and striking a $15-billion bailout deal with Putin that also slashes by a third the price Ukraine pays for the Russian natural gas imports on which its economy depends.
Putin said firmly in Brussels on Tuesday that Russia would honour the terms of the Ukrainian bailout no matter who came to head the Kiev government next.
But Russia's powerful First Deputy Prime Minister Igor Shuvalov said on the sidelines of the Brussels meet that payment of the remaining $12 billion may be reconsidered if the new Ukrainian cabinet follows "a different agenda and different priorities".
Putin seemed to muddy the waters further on Wednesday by saying that Russia will consider resuming the loan payments after the new Ukrainian government is formed -- a statement some analysts read as a sign of confusion in Moscow's ruling circles about their next move.
The two-month rallies in Kiev turned deadly after Yanukovych on January 17 signed into law hugely unpopular measures effectively making the street protests against him illegal.
Yet Putin -- well-known for his tough talk and seeming disregard for diplomatic etiquette -- was uncharacteristically reticent during the most heated days of the crisis and remained silent when the Ukrainian government stood down.
He argued on Tuesday that he "will never interfere" in Ukraine. Analysts believe that Putin decided to take a less blunt approach with Ukraine out of fear that the violence could get out of hand and possibly be blamed on Russia.
Putin has staked both his reputation and prestige on the success of Winter Olympic Games in Sochi that kick off on February 7, but he has faced a chorus of international criticism over the Kremlin's draconian new law against "homosexual propaganda".
As he tries to boost Russia's image ahead of the Games, the Kremlin chief who accused the West of charging into Ukraine wearing "colonial helmets" during the 2004 Orange Revolution has been much more muted in his criticism of both Brussels on Washington on this occasion.
"Putin understands that he cannot interfere in Ukraine too openly because this would ruin his Sochi project," said independent political analyst Dmitry Oreshkin.