A former Turkish army chief who was sentenced to life for his role in a plot to overthrow the government has been freed from prison in Istanbul.
A local court ordered the release of Gen Ilker Basbug, a day after Turkey's constitutional court overturned his sentence citing a legal technicality.
Gen Basbug, who was in charge of the Turkish military from 2008 to 2010, was sentenced to life in August 2013.
Dozens of people were charged over the alleged plot.
Gen Basbug was found guilty of leading a shadowy network of hard-line nationalists known as Ergenekon.
The group was said to have plotted to topple the current government of Prime Minister Recep Tayyip Erdogan's Justice and Development Party (AK Party).
But Gen Basbug, who has always denied the charges, walked free on Friday.
Turkey's constitutional court ruled on Thursday that Gen Basbug's imprisonment had violated his rights.
The court trying him had failed to publish a detailed verdict on the case, it said.
Speaking outside the prison in Istanbul, where he had been held for over two years, Gen Basbug said: "Those who acted with hatred and revenge kept us here for 26 months. They stole 26 months from my life."
His lawyer, Ilkay Sezer, welcomed the release but said there were "many more people in jails who are suffering severe health problems and who have been victims of these courts".
Hundreds of people were jailed in 2012 and 2013 in two high-profile cases, called Sledgehammer and Ergenekon.
In January, the high command of the armed forces and opposition both demanded a retrial for the officers.
Prime Minister Erdogan later said he favoured a retrial, in what many saw as a political turnaround.
In February, the Turkish parliament abolished the specially appointed courts that tried the officers, increasing the possibility of retrials for those convicted.
The latest ruling comes amid heightened political tensions in Turkey over alleged corruption within the government.
The ruling AK Party is rooted in Islam and has moved to curb the power of the Turkish military, which sees itself as guardian of the modern secular state founded by Mustafa Kemal Ataturk.