Ukraine's government announced it was suspending preparations for a landmark trade pact with the European Union on Thursday and said it would renew active dialogue with Russia to help its economy.
A dramatic diplomatic turnaround, the government order came just eight days before President Viktor Yanukovich was due to sign an agreement on trade and cooperation with the EU which would mark a pivotal shift westwards for the ex-Soviet republic's 46 million people, away from historic ally Moscow.
The order issued by Prime Minister Mykola Azarov said the government was suspending preparations for concluding the agreement with the EU "with the aim of adopting measures to ensure national security". Ukraine has been concerned that a punitive Russian trade response could hurt its economy.
The order added that Kiev would "renew active dialogue" with Russia, other members of a Moscow-led customs union and the Commonwealth of Independent States, a grouping of former republics of the Soviet Union.
German Foreign Minister Guido Westerwelle reacted by saying the European Union was still interested in a deal with Ukraine but that it was up to Kiev if it wanted to take the offer up.
A spokesman for President Vladimir Putin said Moscow welcomed Ukraine's desire to develop ties with Russia.
Earlier in the day, Ukraine's parliament rejected draft laws that would let jailed opposition leader Yulia Tymoshenko go to Germany for medical treatment - something EU leaders had pressed Yanukovich to permit before they would sign the pact.
Ukrainians have been divided on the merits of an EU deal, notably since Putin made clear that Moscow might retaliate against what it sees as a betrayal by its historic partner by cutting vital gas flows as it has done in previous "gas wars".
Opposition leader Arseny Yatsenyuk, an ally of Tymoshenko, responded to the government order by saying that a failure by Yanukovich to sign the EU deal would be tantamount to "treason" and provide grounds for the president's impeachment.
The government announcement followed months of protracted wrangling between the EU and Ukraine with the 28-member bloc insisting that Kiev carry out democratic reforms including ending "selective justice" in the country and reforming the judiciary and the electoral system.
The EU's insistence that Yanukovich act to release his Tymoshenko had particularly irked the president, who sees her as a danger to his bid for re-election in 2015.
Nonetheless, he had been scheduled to sign a far-reaching free trade and cooperation agreement with the EU at a summit in the Lithuanian capital Vilnius next Friday, Nov. 29.
(Read more: Poland: A tough sell for investors?)
Yanukovich, whose pro-Europe course had angered, took a harder line this week in negotiations with the EU, threatening not to sign. EU envoys been trying to find a compromise under which Tymoshenko, who was jailed for seven years for abuse of office after a trial Western governments say was political, could be released to Germany for treatment for back trouble.
But, at an angry session on Thursday, parliament which is dominated by Yanukovich's allies, rejected all six bills put forward by the opposition that would allow her to be released. All fell well short of getting the required 226 votes to pass.
Parliament speaker Volodymyr Rybak had kept the door ajar for a possible solution in the coming days, ordering all the parties, including Yanukovich's Regions Party, to negotiate behind the scenes on an agreed draft. Barring a major reversal of the government order, however, that process may be over.
EU envoys, on a shuttle mission to try to nail down a compromise on Tymoshenko, told reporters before the prime minister's statement that they would return to parliament on Friday to monitor any further developments.
German foreign minister Westerwelle spoke of wishing that Ukraine would share the EU's values and choose a "European path of development" but made clear that was up to Kiev.
"Our interest in good relations with Ukraine is unbroken and our offer of a real partnership still stands," he said in a statement. "The ball is in Kiev's court. It is their sovereign right to decide on their path freely."
Yanukovich, in Vienna on a visit on Thursday, refused to answer a question by a Reuters reporter on why the government had broken off preparations for signing the agreement.
Many commentators believed Yanukovich had been playing a game of brinkmanship to extract better financial terms from Brussels. The EU appears split on how much to indulge him.
Many EU members, such as Ukraine's immediate neighbour Poland, are anxious to seal a deal at the summit because it will prise Ukraine away from Russia's historic embrace.
But other EU states, such as Sweden, feel that fundamental democratic values are at stake and want Ukraine to fulfil criteria that include ending "selective justice".
(Read more: Romania risk hinges on euro fine print)
"It will be in the hands of Ukraine's leadership, up to the very last minute, whether the association treaty is signed," summit host Lithuanian President Dalia Grybauskaite said before the Kiev government said it was breaking off negotiations.
In a letter penned before parliament met, Tymoshenko, who came to international prominence as the peasant-braided co-leader of the 2004-5 Orange Revolution protests, said Yanukovich's deputies were preparing a draft to take her abroad "in handcuffs" and then have her returned to prison.
But she urged her supporters to accept even this option to save the signing of the agreement with the EU. "Do this for the sake of the signing of the Association Agreement," she said.
Tymoshenko was sentenced in 2011 to seven years in jail for abuse of office linked to a gas deal with Russia which she brokered and which the Kiev government says saddled Ukraine with an exorbitant price for Russian gas.
She was narrowly defeated by Yanukovich in a run-off for president in 2010. "President Yanukovich and the Regions Party have demonstrated that they are all blinded by fear of Yulia Tymoshenko," opposition leader Yatsenyuk said.
Earlier in the week Yanukovich took a sudden tough line in EU negotiations, telling the EU's point-man on Ukraine, commissioner Stefan Fuele, that in the current situation he could not sign in Vilnius, a European diplomatic source said.