A Ukrainian court has sentenced former prime minister Yulia Tymoshenko to seven years in prison for abuse of office in relation to a 2009 gas deal with Russia that she brokered.

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

Mr Kireyev handed down the sentence - the maximum sought by state prosecutors - in a lengthy judgment at the end of a three-month trial.

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.

Ms Tymoshenko, 50, smiled as Mr Kireyev pronounced his sentence.

But she then rose to her feet and - even as he continued to read his judgment - denounced the "authoritarian regime" of President Viktor Yanukovich and decried the lack of justice in Ukraine under him.

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

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