Ukraine will seek a compromise trade deal with ex-Soviet overlord Russia, Ukrainian President Viktor Yanukovich said after Moscow told Kiev to either join its regional customs union or risk a trade war.

Russian President Dmitry Medvedev ruled out a special deal with Ukraine that could allow Kiev to pursue free trade pacts with both the European Union and a customs union comprised of Russia, Belarus and Kazakhstan.

Medvedev urged Ukraine to become a full member of its customs union, a move that would doom Kiev's plans to sign a free trade deal with the EU.

"Every side has its position but we certainly must look for compromise," Yanukovich's office quoted him as saying on a visit to Ukraine's eastern Donetsk region.

"The policy of compromise is a policy that allows one to defend his national interests while making concessions on some issues. But these concessions will never come at the expense of Ukraine's sovereignty."

After coming to power in February 2010, Yanukovich tilted Ukraine's foreign policy back towards Russia by cancelling Kiev's application to join NATO and signing a deal that extended the stay of Russia's Black Sea navy in Ukraine.

However, Yanukovich declared European integration to be Ukraine's strategic goal, a position he reaffirmed this week in an article written for the Wall Street Journal.

A free trade deal and an association agreement could become his government's first steps in that direction.

But such prospects worry Moscow, and Medvedev has said Russia could use different customs regimes with regard to Ukraine if it refused to join the post-Soviet trade bloc.

Ukraine also depends on Russia for its energy needs and has been trying for over a year to negotiate a discount on the natural gas it imports.

Moscow, however, says this could only happen if Ukraine joined the customs union and allowed Russia's Gazprom to take over the Ukrainian gas pipeline network, which transships most Russian gas bound for Western Europe. (Reuters)