* Summit was to lay ground for new strategic relationship
* But EU leaders criticise "politically-motivated justice"
* Yanukovich voices commitment to Euro-integration (Adds detail)
By Richard Balmforth and Pavel Polityuk
KIEV, Dec 19 (Reuters) - A summit intended to bring Ukraine into Europe's mainstream foundered on Monday after the EU said it would not sign a landmark political and trade deal until Kiev resolves the case of jailed opposition leader Yulia Tymoshenko.
Negotiations were finished on the agreement, which would create a free-trade zone and establish deeper ties, but European Council President Herman Van Rompuy said signing and ratifying it "will depend on political circumstances".
"Our strong concern is primarily related to the risks of politically motivated justice in Ukraine. The Tymoshenko trial is the most striking example," he told President Viktor Yanukovich who sat across a table from him in Kiev.
The summit, four years in preparation, had been intended to mark the start of a new strategic relationship between the EU and the ex-Soviet republic, which has made European integration a priority while managing strong ties with Russia.
But during two hours of face-to-face talks with Yanukovich, Van Rompuy and European Commission President Jose Manuel Barroso appeared to have made little headway in persuading him to relent and bring about the release of Tymoshenko's and other opponents.
Despite the setback, Yanukovich said Ukraine still saw its future in the European Union at some point. "The Association Agreement will be a key moment for the Euro-integrationist course of our state," he told the EU leaders in televised remarks.
With 45 million people, Ukraine is the most populous ex-Soviet state apart from Russia itself, and building a closer relationship is an important strategic goal for Brussels. The stalling of the pact is a setback for some Ukrainian businesses, which covet access to western Europe's markets and investment.
Ukraine is also the main transit route for Russian natural gas into the EU, which relies on Moscow's energy resources.
Yanukovich said strengthening Europe's energy security remained an important part of Ukraine's cooperation with the EU and it would continue to modernise its gas transport system with the support of the EU and its financial institutions.
But efforts to bring Kiev closer to the European mainstream have been stalled since the sentencing of Tymoshenko in October.
An implacable foe of Yanukovich, she was sentenced to seven years in jail for abuse of office while she was prime minister. She called her trial a "lynching" by her adversary.
The EU says her trial raises questions over the democratic credentials of Yanukovich's leadership and his commitment to the bloc's fundamental values. Shortly before the two sides met on Monday, an EU statement said Barroso and Van Rompuy would take Yanukovich to task over her case.
"The need for comprehensive judicial reform and for steps against politically motivated or selective justice in Ukraine will be underlined by the EU leaders," the statement said.
"The Ukrainian authorities need to demonstrate they abide by the values that are at the heart of this association: democracy, rule of law, respect for human rights and independence of judiciary," the statement quoted Barroso as saying.
Tymoshenko was last seen publicly last week, looking pale and gaunt, on a video clip filmed of her in a prison bed by the authorities, apparently against her will.
The 51-year-old politician herself had made a plea from her cell for the association agreement to be signed - irrespective of her plight - for the good of Ukraine.
Any deal would still need to be ratified by parliaments of all the 27 EU states and the European Parliament before it could be implemented, a process that at best could take many months.
The bloc is itself split over Ukraine, with countries such as Poland, Ukraine's immediate neighbour and the outgoing EU president, keen to seize the opportunity to prise Ukraine away from Russia's grip, while other EU members refuse to give ground on the principle of democratic values.
Van Rompuy also took the part of the Ukrainian opposition in accusing Yanukovich of encroaching on press freedoms since coming to office in February 2010: "Media freedom and freedom of assembly are also key for full fledged democracy. Shortcomings have to be corrected," he said.
Though Yanukovich put a brave face on the outcome, a failed summit leaves him and his government with a weakened hand in dealings with Moscow, from whom it is seeking a more advantageous gas pricing deal than one negotiated by Tymoshenko as premier.
Moscow, for its part, is seeking to entice Ukraine away from the EU and could now step up pressure on Kiev to consider joining a customs union in exchange for cheaper gas.
Underscoring the closeness of the relationship with Moscow, the presidential administration said Yanukovich would visit Moscow on Tuesday for an informal meeting of leaders of former Soviet republics in the Commonwealth of Independent States.
Tymoshenko was a leading light in the Orange Revolution protests of 2004-5 which denied Yanukovich his first bid for the presidency. She went on to lose narrowly to Yanukovich in a presidential election in 2010.
Some political commentators in Kiev say her prosecution was personally driven by Yanukovich who has not forgotten her role in the Orange Revolution, nor forgiven her for her biting personal attacks during the 2010 election campaign.
Other insiders say Yanukovich was strongly influenced by powerful figures in the gas business who see Tymoshenko as a threat to their interests if she came to power again. (Writing By Richard Balmforth; Editing by Alastair Macdonald)