By Natalia Zinets and Justyna Pawlak
KIEV/BRUSSELS (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 the summit on November 28-29, 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 frees 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 Russia, 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 could not manage to agree on terms for such a draft and accused each other of 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 had expected to conclude their mission on Wednesday but opted to return to Kiev for further talks next week when they hope the Ukraine parliament could make another attempt to pass the law affecting Tymoshenko.
"We plan to return to Kiev next week and to spend as long as is necessary with as many people as is necessary to do whatever is necessary to secure success," Cox told reporters.
Their findings will feed into a pre-summit meeting of EU foreign ministers on November 18 when Kiev's record in meeting important democratic criteria - including a release of Tymoshenko - will be assessed.
The envoys said Ukraine had made "considerable progress" in meeting EU conditions but had not gone far enough. "We regret to observe that at this time we are not yet in the position to report full compliance," they said in a statement.
Kwasniewski said he saw a "50-50" percent chance of finding a solution. German Foreign Minister Guido Westerwelle said that time was running out for Kiev and the failure to agree a legal formula to release Tymoshenko was regrettable.
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," Lithuanian Foreign Minister Linas Linkevicius said in remarks carried by BNS news agency.
APPEAL TO ENVOYS
Former Economy Minister Arseny Yatsenyuk, speaking for the three main opposition parties, urged the EU 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.
Yanukovich's supporters in parliament had earlier pressed for a draft law that would release Tymoshenko to Germany for treatment but require her to return to Ukraine to complete her jail sentence. The opposition, by contrast, wanted an option under which her sentence could be wiped out after treatment.
(Additional reporting by Pavel Polityuk in Kiev, Alexandra Hudson in Berlin, Andrius Sytas in Vilnius and Adrian Croft in Brussels; Editing by Mark Heinrich)