Turkey's highest appeals court has overturned the convictions of 275 people, including senior military officers, accused of plotting a coup.
The appeals court ruled that the convictions were unsafe because the existence of a clandestine network called Ergenekon was unproven.
The officers, journalists, lawyers and academics were found guilty in 2013 of plotting the overthrow of then-prime minister Recep Tayyip Erdogan.
The new ruling may lead to a retrial.
The Ergenekon case was one of the biggest in recent Turkish history, pitting Mr Erdogan's supporters in the Islamist-rooted AK Party against the secularist military establishment.
The trials took place amid high security at Silivri, outside Istanbul, and police repeatedly used tear gas and water cannon to keep protesters at a distance.
The highest-ranking defendant was ex-military chief Ilker Basbug, who was given a life sentence. Sixteen other life sentences were also handed down, with long jail terms for others.
Pressure on military
The appeals court found several other flaws in the original proceedings, including illegal surveillance and searches.
Mr Basbug walked free in March 2014, after Turkey's constitutional court overturned his sentence, citing a legal technicality. He was in charge of the Turkish military from 2008 to 2010.
The Ergenekon network was accused of plotting a coup against Mr Erdogan - now Turkey's president - in 2003-2004.
The trials were based on suspicions of a shadowy "deep state" conspiring to cause social unrest which would then provoke a military coup.
Mr Erdogan's critics saw the investigation as an attempt to curb the influence of the powerful military, which for decades saw itself as the final arbiter in Turkish politics. Since coming to power in 2002, Mr Erdogan has asserted civilian supremacy over the military.
Between 1960 and 1997, the armed forces removed four civilian governments. The Welfare Party ousted in 1997 was a predecessor of Mr Erdogan's Justice and Development Party (AKP).
Hundreds of military officers were arrested in a five-year investigation before the Ergenekon verdict. Some of them were prosecuted in a separate case called "Sledgehammer".