It all started with great fanfare last year in the Ukrainian city of Kharkiv, where Ukraine's newly elected President Viktor Yanukovych and his cheerful-looking Russian counterpart, Dmitry Medvedev, signed a sweeping agreement extending Russia's lease of a former Soviet naval base at the Black Sea port of Sevastopol.

The Kremlin called it historic. The deal reversed the policies of Yanukovych's pro-Western predecessors, under whom diplomatic relations with Moscow were all but cut off. In return, Russia gave Ukraine a temporary discount on the amount it paid for Russian natural gas, easing a landmark 10-year agreement reached in 2009 that some hoped would end decades of bitter acrimony over prices by establishing market-based gas relations.

But a little more than one year on, the honeymoon is over. Now Ukraine says it's preparing to take Russia to international court over the 2009 deal, saying it's overcharging Kyiv by up to $6 billion a year compared to other European countries such as Germany.

But Moscow says it would consider a new deal only if Ukraine drops its objections to joining a Russian-led customs union. Yanukovych has called that stance "humiliating."

"We will not allow them to talk to us in such a way," he said last weekend. "They pushed us into a corner, then started to dictate terms. It humiliates not only me but also the state, and I cannot allow it."

'Soon Find A Solution'

Ukraine is threatening to sue Russia in the Stockholm Arbitration Tribunal, although Ukrainian Foreign Minister Kostiantyn Hryshchenko said on September 5 he hoped that wouldn’t be necessary.

"Although, of course, we have enough arguments to present our case in any international court," Hryshchenko said, "we think, however, that we'll very soon find a solution that would suit the modern market situation and modern contract practice."

Both sides have said they want to avoid a repetition of past disputes, during which Russia twice cut off supplies during bitter cold spells, disrupting deliveries to other European countries and leaving millions without heat. That's because up to 80 percent of Russia's gas exports to the EU pass through Ukraine.

Russian Foreign Minister Sergei Lavrov (right) and his Ukrainian counterpart, Kostyantyn Hryshchenko, before their talks in Moscow on September 5.

But Russian Prime Minister Vladimir Putin ratcheted up the tension on September 5, saying a new pipeline to Germany set to begin pumping gas later this year would weaken the "diktat of transit countries."

According to Ukraine's agreement with Russia, Kyiv paid about $230 per 1,000 cubic meters of gas in 2009, an amount that's expected to rise to $400 later this year.

Ukraine says it wants to at least reduce the amount of gas it buys from Russia by more than one-third, but even that amount is fixed.

The high prices are exacerbating an economic crisis in a country that depends heavily on natural gas for producing its top exports of metals and chemicals, especially from Yanukovych's support base in the industrial east.

Providing A Pretext

Many believe the rift with Moscow to be partly responsible for the trial of former Prime Minister Yulia Tymoshenko, accused of abuse of office for signing the 2009 gas deal.

Analysts say prosecuting her is part of an attempt to delegitimize the deal's legal basis. Tymoshenko's conviction may provide a pretext to file suit against Russia, which has criticized the trial.

Kyiv has also threatened to break up its state oil and gas enterprise Natfogaz in line with EU recommendations as another possible excuse to revise the deal with Moscow.

Volodymyr Fesenko of Kyiv's Penta Center for political studies traces the disagreement to last year's Kharkiv deal, saying Yanukovych stumbled by giving Moscow far too much and expecting more in return.

"The deal raised expectations on both sides," Fesenko says. "Yanukovych believed he had gone a long way to accommodate the Russians, but it turned out they weren't willing to make any further compromises."

Fesenko says the deal convinced the Kremlin that Yanukovych was a weak leader to be pressured for reestablishing Russia's influence over Ukraine. But when Moscow proposed merging its state Gazprom monopoly with Ukraine's Naftogaz, Kyiv balked.

Relations soon began souring, stalling a drive toward integrating the two countries. When Yanukovych stepped up integration talks with the European Union earlier this year -- which is incompatible with joining a Russian-led customs union -- along with negotiations to join the World Trade Organization, Fesenko says Moscow was caught off guard.

"That was a very unpleasant surprise for the Russians," Fesenko says. "They were expecting Ukraine to join their customs union [together with Kazakhstan and Belarus], but when Yanukovych said European integration was his priority, they pushed back, starting by threatening sanctions."

Part Of Political Ploy?

Putin has said Moscow will consider revising the gas deal only if Ukraine agrees to merge its Naftogaz with Gazprom, reinforcing the view that Moscow's intransigence over gas prices is part of a political ploy to force Ukraine into a closer orbit.

Fesenko believes Yanukovych's personality has contributed to the mounting friction.

"He doesn’t like being pressured," Fesenko says of the man who was jailed for assault in his youth. "He's used to tough talk in domestic as well as international politics because his life experience has taught him not to display weakness."

No jackets required: Russian President Dmitry Medvedev (right) and his Ukrainian counterpart, Viktor Yanukovych, in Sochi on August 11.

But analysts say schemes such as the threat to reorganize Naftogaz -- long recommended by the International Monetary Fund -- smack of desperation. In Moscow, former Russian Deputy Energy Minister Vladimir Milov told RFE/RL's Ukrainian Service that Ukraine has little legal basis for forcing Moscow to revise the gas deal.

"Besides, Russia has often threatened to take Ukraine to court during arguments in the past," Milov says, "but that never happened because Gazprom is a big beast that's hard to budge and doesn’t respond well to international legal mechanisms."

Even as Ukraine is using its negotiations with the EU to leverage its relations with Russia, Yanukovych is coming under heavy criticism from Western critics worried that the prosecution of Tymoshenko is politically motivated and symbolizes the reversal of the democratic gains of the Orange Revolution in 2004. Last week, EU foreign policy chief Catherine Ashton said the trial would figure during a meeting with EU foreign ministers in Poland on September 5.

"We will think about our Eastern partners and Eastern neighbors with a special focus on what is happening in Ukraine and our concerns for Yulia Tymoshenko and the trial there," she said.

It's not clear how the mounting disagreement between the estranged allies will play out. For now, Yanukovych warned in an interview with "Kommersant" newspaper published on September 6 that Ukrainians aren't Moscow's "poor relations."

"Talking to us with ultimatums from a position of strength," he said, "won’t bring success."