A Turkish court on Monday sentenced a former army chief and other top brass to life in prison in a high-profile trial of 275 people accused of plotting to overthrow the Islamic-rooted government.
Police fired tear gas at protesters outside the court in a town near Istanbul as the verdicts were being delivered in the highly-divisive case.
Ex-military chief Ilker Basbug, along with several other army officers, were sentenced to life in prison, while 21 people were acquitted, according to the verdicts issued so far.
The trial has been seen as as a key test in Prime Minister Recep Tayyip Erdogan's showdown with secularist and military opponents during his decade-long rule.
The defendants were on trial on dozens of charges, ranging from membership of an underground "terrorist organisation" dubbed Ergenekon to arson, illegal weapons possession, and instigating an armed uprising against Erdogan and his Justice and Development Party (AKP), which came to power in 2002.
Tensions were high outside the high-security tribunal in the town of Silivri, near Istanbul, and hundreds of riot police fired tear gas to disperse some 1,000 protesters who had evaded a police barricade and attempted to march on the courthouse, an AFP reporter said.
Istanbul governor Huseyin Avni Mutlu had on Friday said that demonstrations outside the court would not be allowed.
Amid a heavy security presence, only the suspects, lawyers, journalists and members of parliament were allowed to enter the building for the hearing.
"This trial is purely political," Mustafa Balbay, one of the defendants, told an audience of MPs and journalists inside the courtroom.
"Today it's the government which is convicted, not us."
Basbug, 70, led Turkey's military campaign against the rebel Kurdistan Workers' Party (PKK) for many years, only to find himself accused in his retirement of having led a terrorist group himself.
The verdicts come after Turkey was rocked in June by mass protests that presented Erdogan's government with its biggest public challenge since it came to power in 2002.
Police had earlier chased away a few dozen demonstrators waving Turkish flags and chanting "How happy is the one who calls himself a Turk," referring to a saying by modern Turkey's founder Mustafa Kemal Ataturk.
"I came here so that those people who have been behind bars for five years with no real proof against them are not left alone," said Dogan Muldur, a retired Turkish Airlines pilot.
"There are a lot of fictitious crimes in the case but no proof," he said.
"I came to fight injustice, to defend our rights. I am an ordinary Turkish citizen, I have no ties with the suspects," added housewife Ebru Kurt.
"I am not saying that all the people in jail are innocent, but I am convinced that most of them have spent years in jail even though they have done nothing wrong."
The 2,455-page indictment accuses members of Ergenekon — an alleged shadowy network of ultranationalists trying to seize control in Turkey — of a string of attacks and political violence over several decades to stir up unrest.
Turkey's secular opposition has denounced the lengthy trial, which began in 2008, as a witch hunt aimed at silencing government critics.
Pro-government circles have praised the Ergenekon trial as a step towards democracy in Turkey, where the army violently overthrew three governments in 1960, 1971 and 1980.
In 1997, the army pressured then Islamic-leaning prime minister Necmettin Erbakan, the political mentor of the current premier, into stepping down in what was popularly dubbed a "post-modern coup" strategy.
Prosecutors claim that Ergenekon, named after a mythical place in central Asia believed to be the homeland of Turks, is made up of loosely connected branches with an eventual goal of toppling the Erdogan's government and restructuring Turkey on a nationalist footing.
The network was uncovered in June 2007 when weapons and explosives were discovered during an anti-terrorist operation in an Istanbul suburb.
The trial is one of a series of cases in which members of the Turkish army, the second biggest in NATO, have faced prosecution for alleged coup plots against an elected government.
In a separate case in September dubbed "Sledgehammer," more than 300 hundred active and retired army officers, including three former generals, received prison sentences of up to 20 years over a 2003 military exercise alleged to have been an undercover coup plot.