By Richard Balmforth and Pavel Polityuk
KIEV (Reuters) - Ukraine abruptly abandoned a historic new alliance with its western neighbors on Thursday, halting plans for an imminent trade pact with the European Union and saying it would instead revive talks with Russia.
EU officials, who had been preparing to sign the long-negotiated deal at the end of next week, said President Viktor Yanukovich cited fears of losing massive trade with Russia when he told an EU envoy this week that he could not agree terms.
Yanukovich's prime minister issued the dramatic order to suspend the process in the interests of "national security" and renew "active dialogue" with Moscow. EU officials, who had hoped the president's complaints in recent days were a last-minute bargaining tactic, saw little chance of saving the deal.
Russia, sensing betrayal in the westward pivot of its most populous former Soviet satellite, had threatened retaliation, raising fears it could cut energy supplies in new "gas wars". The Kremlin welcomed the news of Ukraine's change of heart.
EU pressure for Yanukovich to release a jailed opponent whom he sees as a threat to his re-election in 2015 also dogged months of shuttle diplomacy with Ukraine, a country in which Russians see the historic origins of their nation and where many of the 46 million people are native Russian speakers.
Ukraine's parliament, dominated by Yanukovich's allies, rejected a series of bills earlier on Thursday that would have satisfied the EU by letting opposition leader Yulia Tymoshenko out of prison to travel to Germany for medical treatment.
Shortly afterwards Prime Minister Mykola Azarov issued the order on suspending the EU process and reviving talks with Russia, other members of a Moscow-led customs union and the former Soviet Commonwealth of Independent States.
A spokesman for Russian President Vladimir Putin said: "We welcome the desire to improve and develop trade and economic cooperation." Ukraine was a "close partner", he added.
European governments, especially those dominated by Moscow during the Cold War, have been keen to anchor Ukraine's bulk and population closer to the West, though others have doubted whether corruption and oppression make it a viable partner.
Germany's foreign minister said the European Union was keen still to improve ties with Ukraine but that it was up to Kiev to decide. Swedish Foreign Minister Carl Bildt, a veteran of east-west diplomacy on the continent, was blunter:
"Ukraine government suddenly bows deeply to the Kremlin," he tweeted. "Politics of brutal pressure evidently works."
He added that Ukraine's economy would decline and that the rupture would "kill" Kiev's prospects for foreign investment.
EU officials told Reuters that when Yanukovich met the EU commissioner in charge of relations with Kiev, Stefan Fuele, on Tuesday, he had said he could not agree to the deal. It would, he said, cost Kiev $500 billion in trade with Russia over the coming years, while implementing demands for Ukraine to adopt EU legal and other standards would cost another $104 billion.
Some EU diplomats had viewed that stance as brinkmanship, an effort to secure better terms. But on Thursday, after the government order, EU envoy Aleksander Kwasniewski was quoted as telling a Polish news agency that next week's deal was dead.
"The agreement will not be signed in Vilnius," the former Polish president told TVN24.
"Our mission is ending. It is a pity that it is ending without a finish like the signing of the agreement."
Ukrainian opposition leader Arseny Yatsenyuk, an ally of Tymoshenko, said that if Yanukovich failed to sign it would be "treason" and provide grounds for the president's impeachment.
Yanukovich himself, on a visit to Austria, declined comment after the government's statement. Earlier, he had told a news conference in Vienna: "Ukraine is continuing to move in the direction of European integration ... We are convinced that we have set off on the right path."
The 28-member EU had insisted Kiev carry out democratic reforms including ending "selective justice" - the EU sees Tymoshenko as a political prisoner, irking Yanukovich who narrowly defeated her in the 2010 presidential election.
Nonetheless, he had been scheduled to sign the far-reaching free trade and cooperation agreement with the EU at a summit in the Lithuanian capital Vilnius next Friday, November 29.
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."
(Additional reporting by Natalya Zinets in Kiev, Andrius Sytas in Vilnius, Luke Baker and Martin Santa in Brussels and Georgina Prodhan in Vienna; Editing by Anna Willard and Alastair Macdonald)