Istanbul (AFP) - Turkey's highest appeals court on Thursday overturned scores of convictions over an alleged coup plot against the government of then prime minister Recep Tayyip Erdogan.

The court threw out an earlier verdict by an Istanbul court which saw many top military officers convicted, saying the original trial had failed to uncover proof of the alleged plot in 2003, media reports said.

There was no evidence the "terror organisation", dubbed Ergenekon, was real, the Anatolia news agency said.

The appeals court also found that the lower court had relied on illegal wiretappings, statements from witnesses whose identities were not revealed, the illegal wiretapping of members of the National Intelligence Organisation (MİT) and unlawful searches for its 2013 verdict.

The ruling is the latest twist in a drama which saw 275 people officers, journalists, lawyers and academics indicted for allegedly conspiring to oust Erdogan, who is now the country's president.

- 'Poisoned judicial process' -

In one of the biggest cases in the country's recent history, prosecutors claimed they had uncovered a shadowy "deep state" which hoped to foment social unrest and a military coup.

In 2014, a Turkish court went so far as to describe the alleged Ergenekon network as an "armed terrorist organization".

Scores of defendants were released in the months following their convictions after successful claims that their rights had been violated, but many were ordered not to travel and clamoured for their reputations to be restored.

Erdogan's supporters have accused US-based preacher Fethullah Gulen, his one-time ally and now arch enemy, of trying to weaken the country's powerful secularist army by fabricating evidence against officers for the trial.

Turkey's deputy prime minister Yalcin Akdogan took to Twitter after Thursday's ruling to accuse Gulen's network of followers of having "poisoned the judicial process" in the original trial.

But Erdogan had originally been seen as a driving force behind the criminal investigation, in his battle against a military establishment which has for decades held it has a duty to protect Turkey's secular democracy against creeping Islam.

Story continues

- 'Could go to retrial' -

The investigation into a possible coup was sparked after the discovery in 2007 of a cache of explosives at the house of a former army officer, which prosecutors said led them to uncover a criminally-minded network.

The armed forces have long wielded power in Turkey, bringing down four governments between 1960 and 1997.

But after falling out in 2014 with Gulen, a self-exiled Muslim cleric who wields tremendous influence across all levels of power, Erdogan said he would favour retrials for those caught-up in the alleged coup plot case.

The about-turn followed a huge corruption scandal at the end of 2013 which implicated Erdogan's entourage and which Gulen was accused of masterminding.

The government has since then purged the police and justice system of those suspected of being in cahoots with Gulen.

Kemal Kilicdaroglu, the head of Turkey's main CHP opposition party, welcomed the appeal court's decision Thursday, saying it "revealed how right in our criticisms we were in the past. There are still (independent) judges in this country".

Ilkay Sezer, lawyer for the highest-ranking defendant, former military chief Ilker Basbug -- who was originally given a life sentence -- told AFP the case could still go to a retrial.

"Any such decision would rest with the prime minister under the constitution," he said.