On 11 October 2011 a Ukrainian judge sentenced Tymoshenko to seven years in prison for misusing her powers as Prime Minister when she signed a natural gas deal with Russia in 2009. She had been in prison for improper behaviour in court since 5 August 2011. Tymoshenko appealed against the sentence on 24 October 2011; she said the sentence was an act of revenge by Viktor Yanukovych (he has said it is not). The European Union and Russia protested against the sentence.