By Natalia Zinets and Richard Balmforth
KIEV (Reuters) - Ukraine's parliament failed on Wednesday to agree on a draft law allowing jailed opposition leader Yulia Tymoshenko to go to Germany for medical treatment, clouding prospects for signing landmark agreements with the European Union this month.
Germany warned that with the Vilnius summit only two weeks away, time was running out for Kiev to settle the case of Tymoshenko. Summit host Lithuania said there would be no success unless Ukraine produced "results".
Accords on association and free trade, due to be signed at a summit in the Lithuanian capital Vilnius on November 28, offer the former Soviet republic the chance of a historic shift westwards, and away from Russia.
But the EU has made an end to "selective justice" a pre-requisite for the signing, and success at Vilnius hinges on whether President Viktor Yanukovich releases ex-prime minister Tymoshenko, his fiercest opponent.
She was jailed in 2011 for seven years for abuse of office after a trial which the EU says was political.
The proceedings will be watched closely by Moscow which is opposed to Ukraine signing the agreement and has threatened counter-measures. The Kremlin wants Kiev to enter an alternative Moscow-backed customs union.
Though he has refused to pardon Tymoshenko, Yanukovich has said he is ready to break the impasse by signing a draft law to allow her to go to Germany to be treated for chronic back pain.
At a special session on Wednesday, pro-Yanukovich deputies and Tymoshenko's supporters in parliament failed to agree on any such draft and blamed each other for seeking to undermine agreement in Vilnius.
Two EU envoys, Irish politician Pat Cox and former Polish President Aleksander Kwasniewski, who have been on a shuttle mission from Brussels to Kiev to find a compromise, attended the special parliament session.
They were due to return to Brussels and give a news conference on Wednesday evening. Their findings will feed into a pre-summit meeting of EU foreign ministers on November 18 when Kiev's record in meeting key democratic criteria - including the freeing of Tymoshenko - will be assessed.
The envoys did not appear to have a good story to tell, though Kwasniewski expressed the hope that Ukraine's parliament would be finally able to agree on terms for Tymoshenko's release on November 19 when it meets again.
"We know that politically this is very complicated. But we hope that enough goodwill will emerge to be able to reach a consensus," he told journalists.
German Foreign Minister Guido Westerwelle said that time was running out for Kiev.
"We regret that the parliament of Ukraine today again could not agree on a new legal measure to allow medical treatment abroad. This is a missed chance for a way of solving the Tymoshenko case. Time is running out," he said in a statement.
Summit host Lithuania was equally critical.
"Much is now in the hands of President Yanukovich ... It is possible for him to take the required decisions, to assume leadership and responsibility for the fate of his country," said Lithuanian Foreign Minister Linas Linkevicius in remarks carried by BNS news agency.
APPEAL TO ENVOYS
Former Economy Minister Arseny Yatsenyuk, speaking for the three main opposition parties, urged the envoys not to deliver too harsh a verdict on Ukraine, but "give Viktor Yanukovich time to come to his senses".
Yanukovich has stuck to his policy of Euro-integration despite intense diplomatic pressure from Russia - on which Ukraine relies for gas - and the threats of retaliatory trade action by the Kremlin.
But commentators say they are now detecting a change of 'mood music' from the political establishment in Kiev around the Vilnius summit.
A call by Ukraine's union of industrialists - dominated by Yanukovich supporters - for the signing to be delayed by a year was given prominence by local media.
Prime Minister Mykola Azarov at a cabinet meeting on Wednesday unusually placed the emphasis on the need to repair relations with Russia rather than on what prospects would be opened up by association with the EU.
A criminal action brought against Tymoshenko's chief lawyer has further soured the atmosphere.
"The Yanukovich administration appears to have been going out of its way to scupper any chance of a deal with the EU - this comes despite rhetoric at the top which had appeared supportive of the EU integration process," Tim Ash of Standard Bank wrote.
Yanukovich's supporters in parliament had earlier pressed for a draft law that would release her to Germany for treatment but require her to return to Ukraine to complete her sentence. The opposition has been pushing an option under which her sentence could be wiped out after treatment.
But on Wednesday no agreed draft appeared at all from a parliamentary working group and pro-Yanukovich deputies and Tymoshenko supporters reproached each other for the deadlock.
(Additional reporting by Pavel Polityuk in Kiev, Alexandra Hudson in Berlin and Andrius Sytas in Vilnius; editing by Ralph Boulton)