STRASBOURG, France (Reuters) - Ukrainian opposition leader Yulia Tymoshenko was unlawfully detained before she was tried and jailed in 2011, the European Court of Human Rights said on Tuesday in a ruling that may add to Western complaints over her fate.

The French-based rights court dismissed allegations by Tymoshenko that she was subjected to inhuman and degrading treatment, but ruled the pre-trial detention order was an unjustified restriction of her freedom at that time.

However, despite the hopes of her supporters, Ukraine said the ruling would not affect her status as a jailed convict.

Tymoshenko, 52, was twice prime minister before losing a close presidential race in 2010 to Viktor Yanukovich, whose 2004 bid for the post was thwarted by the Orange Revolution, a wave of pro-democracy protests she had helped lead.

She was tried and sentenced in October 2011 to seven years in jail for abuse of office in relation to her role in a gas deal with Russia that, according to Yanukovich's government, had saddled Ukraine with exorbitant energy costs.

"The court held in particular, that Ms Tymoshenko's pre-trial detention had been arbitrary, that the lawfulness of her detention had not been properly reviewed and, that she had no possibility to seek compensation for her unlawful deprivation of liberty," the court ruling said.

The European Union has suspended work on free trade and broader cooperation pacts with Kiev over the case. EU ministers last week said they were being stymied by "selective justice".

Since last May, Tymoshenko, 52, has been receiving treatment for back trouble in a state-run hospital in the city of Kharkiv.

But Yanukovich has said he cannot order her release because Tymoshenko is also due to be tried on tax evasion and embezzlement charges and she is being investigated in a murder case. She has denied all charges against her.

The Justice Ministry said it had not decided whether to appeal but she would not be freed as a result of the ruling.

"... an acknowledgement of the violation of an individual's right to liberty (in the pre-trial stage) cannot result in the release of a person who is serving a sentence handed down by a court," Justice Minister Oleksander Lavrynovych said.

Nonetheless, ruling has increased hopes she might be freed once the court rules on the actual verdict at a later date.

"We hope that the court will quickly review our second complaint regarding the verdict and we think it will be judged politically motivated," Mykola Tomenko, a parliament deputy from Tymoshenko's Batkivshchyna (Fatherland) party, told reporters.

Tymoshenko's lawyer, Serhiy Vlasenko, said Ukraine had been found wanting by Europe's highest court on human rights issues and should now release her.

(Reporting by Gilbert Reilhac in Strasbourg and Olzhas Auyezov in Kiev; Writing by Brian Love; Editing by Alison Williams)