Ukraine gave Russia one last chance Thursday to resolve their second major gas dispute in three years as President Dmitry Medvedev blamed Kiev for behaving unreasonably.

Energy-dependent
Ukraine has been pressuring Russia to revise the terms of a contract which Kiev signed after having its winter supplies cut off in 2009--a controversial Kremlin move that also affected parts of Europe .

But Medvedev has set tough conditions which include
Ukraine giving up its European ambitions by joining a Russian-led customs union and also ceding half of its state energy company to the Kremlin-run gas firm OAO Gazprom (GAZP.RS).

A senior Ukrainian official has warned that Kiev would take Moscow to court if the dispute were not resolved by mid-October and Prime Minister Mykola Azarov reaffirmed that message Thursday by issuing a latent ultimatum.

"We will make one more attempt to agree with our Russian colleagues. We will try one more time to find an agreement," Azarov said in a speech at the National University of Kiev.

"If this fails, then without doubt, the entire responsibility for the consequences will lie with those leaders who refuse to listen to our arguments," said Azarov in a clear reference to Russian officials.

Ukraine imports most of its energy from its eastern neighbor and Wednesday vowed to purchase one-third less gas from Russia next year than it 2011.

Russia has responded by threatening to sue Ukraine over breach of contract.

The escalation comes at a sensitive political time for
Ukraine and coincides with the trial of former prime minister Yulia Tymoshenko--the opposition leader who signed the gas deal and later lost an election to President Viktor Yanukovych.

She is currently detained and on trial on charges of abusing her powers to sign the gas agreement, while Azarov has accused Tymoshenko of selling out
Ukraine 's interests to Russia .

The row has already resulted in one round of failed talks between Medvedev and Yanukovych and the Kremlin chief adopted a tough stance when asked about
Ukraine on Wednesday evening.

"They are seeking non-stop indulgence," Medvedev told reporters in one of his harshest attacks on
Russia 's neighbor.

Medvedev said the offer he has made Ukraine--lower prices in exchange for joining a regional customs union as well as the partial sale to Russia of its state energy company--was non-negotiable.

"It seems to me that we have made a clear proposal: if you want gas at a lower price, you must be part of the common area (union)," Medvedev said.

"If you do not want that, make us a commercial proposal that is advantageous to
Russia ," he added in reference to the Ukrainian state energy company.

Azarov responded Thursday by saying that
Ukraine planned to list shares of its state gas company Naftogaz on the stock market instead.

"According to our estimates, we get a serious investment from this--$5-10 billion," Interfax quoted Azarov as saying.

Russia --the world's largest energy producer and supplier of about a quarter of Europe 's natural gas--has come under pressure from both governments and companies to revise how it sets the terms of its deals.

But Energy Minister Sergei Shmatko insisted
Russia was only implementing "fair price" agreement and not trying to put economic pressure on Ukraine .

"There are no grounds for us having a conflict like the one we had in 2009. What we are having is a squabble over the fair price of gas," Interfax quoted Shmatko as saying.

"We rule out the possibility of a harsh scenario that interrupts the transit of gas," Shmatko added.