Yulia Tymoshenko
Former Ukrainian Prime Minister Yulia Tymoshenko attends a pre-trial hearing at a city court in Kiev June 24, 2011. Reuters

A Ukrainian court Tuesday sentenced former Prime Minister Yulia Tymoshenko to seven years in prison for abuse of office in relation to a 2009 gas deal with Russia which she brokered.

The court has ... found Tymoshenko guilty ... and sentenced her to a prison term of seven years, Judge Rodion Kireyev said.

Kireyev handed down the sentence -- the maximum sought by state prosecutors -- in a lengthy judgment at the end of a three-month trial which has polarized society in the ex-Soviet republic and risks jeopardizing relations with the West.

The European Union, a big trading partner for Ukraine, has warned that jailing the charismatic opposition leader will put at risk ratification of an association agreement due to be signed later this year.

Tymoshenko, 50, smiled as Kireyev pronounced his sentence. But she then rose to her feet and -- even as he continued to read his judgment in a monotone -- denounced the authoritarian regime of President Viktor Yanukovich and decried the lack of justice in Ukraine under him.

Earlier Kireyev said she had exceeded her powers in railroading the state energy firm Naftogaz into signing a 10-year gas supply deal with Russia in 2009 which ended with Ukraine paying an exorbitant price for gas.

Tymoshenko, who was twice prime minister but lost a fight for the presidency to Yanukovich in February 2010, said her trial was a vendetta by her archrival and denied wrongdoing.

(Reporting by Olzhas Auyezov; Writing by Richard Balmforth)