A Turkish court on Monday ordered the retrial of an opposition lawmaker whose 25-year jail sentence sparked one of the biggest opposition protests in years, a party spokesman said.
The sentence, for revealing state secrets and espionage, was handed to Enis Berberoglu of the main opposition Republican People's Party (CHP), in June.
But a regional appeals court in Istanbul quashed the conviction and ordered a retrial, CHP spokesman Bulent Tezcan told AFP, though adding that Berberoglu will remain in jail for now.
"From the start, we have said it was an illegal decision... we expected it to be quashed," Tezcan said.
"This is a joyous move but the fact that a decision for his release was not given shows his rights continue to be violated."
Tezcan said Berberoglu's lawyer would appeal to the court for the MP to be released.
Following the conviction, CHP leader Kemal Kilicdaroglu walked from Ankara to Istanbul where he was joined by thousands of others to highlight alleged injustices under President Recep Tayyip Erdogan.
Kilicdaroglu walked 450-kilometres (280 miles) in 25-days and ended his march with a "justice" rally attended by hundreds of thousands in Istanbul.
That rally was the biggest opposition action in Turkey since nationwide protests against Erdogan's rule in June 2013.
Berberoglu was the first lawmaker from the main secular opposition party -- founded by Turkey's first president Mustafa Kemal Ataturk -- to be held in custody since last year's coup bid.
Following the attempted overthrow of Erdogan, more than 50,000 people including journalists have been arrested under the state of emergency raising concerns in the West.
Eight MPs from the pro-Kurdish Peoples' Democratic Party including co-chairman Selahattin Demirtas as well as former party co-leader Figen Yuksekdag, who was stripped of MP status, are currently in detention in Turkey.
Berberoglu's case relates to the controversial publication by the opposition Cumhuriyet daily in 2015 of images purportedly showing the Turkish intelligence service seeking to transport arms over the border to Syria.
The MP stood accused of giving images to Cumhuriyet's former editor-in-chief, Can Dundar, who fled to Germany after he was given a five-year-and-10-month jail term in the case.