A Turkish court has ordered the release of 230 military officers jailed over a 2003 plot to overthrow the government of Prime Minister Recep Tayyip Erdogan.
On Wednesday, Turkey's highest court ruled that the original trial had been flawed, opening the way for a retrial.
Mr Erdogan backed such a move in January after his senior adviser suggested the men had been framed.
The officers in the "Sledgehammer" plot were accused of planning to bomb mosques and trigger a war with Greece.
The 2012 convictions were seen as part of Mr Erdogan's drive to tame an army that had long dominated politics.
The officers were alleged to have presented the Sledgehammer plan at an army seminar in 2003.
It was said to involve provoking widespread civil unrest in order to justify a military intervention.
The defendants argued that the plot was a theoretical scenario to help them plan for potential unrest.
They accused the government of carrying out a witch-hunt against the military, and heads of Turkey's armed forces resigned in protest when the officers were detained in 2011.
Turkey's military has a long history of intervening in politics and there were a series of military coups from 1960 to 1980.
The army also led a campaign in 1997 that forced the resignation of the country's first Islamist-led government.
The ruling AK Party is rooted in political Islam and has moved to curb the power of the military, which sees itself as guardian of the modern secular state founded by Mustafa Kemal Ataturk.
Mr Erdogan's decision to back a retrial of the officers was seen as the latest sign of rift between him and a network of prosecutors who support prominent Islamic scholar Fathullah Gulen.
Correspondents say Mr Erdogan formed an unofficial alliance with prosecutors at the start of his rule in an effort to remove the military from politics.
But in December 2013, some of those same prosecutors ordered the arrest of a number of Mr Erdogan's allies as part of an investigation into alleged corruption in government.
Mr Erdogan condemned the investigation as a "dirty plot", and the military suggested that the arrests of their officers had been part of the same plot and demanded retrials.