Q&A: Turkey's military and the alleged coup plots
The Ergenekon coup plot trial is widely considered Turkey's most important court case in recent years. It targeted the military establishment, long seen as the guardian of Turkey's secular values.
The 275 defendants included the former armed forces chief - Gen Ilker Basbug - as well as other senior officers, journalists, lawyers, academics and politicians. They were accused of plotting to topple Prime Minister Recep Tayyip Erdogan's government.
The ruling Justice and Development (AK) Party, which is rooted in Islam, has cracked down hard on alleged anti-government conspirators, and there have been other high-profile trials of military officers.
What were the verdicts in the Ergenekon trial?
Gen Basbug was given a life sentence. He is the most senior former officer to be caught up in the case. Until he retired in 2010 he was the head of Turkey's armed forces, the second-largest in Nato.
In total, 17 people were given life sentences, including retired generals Veli Kucuk, Hursit Tolon, Hasan Ataman Yildirim, Hasan Igsiz, Nusret Tasdelen; ultra-nationalist Workers' Party leader Dogu Perincek; journalist Tuncay Ozkan and lawyer Kemal Kerincsiz.
The defendants faced dozens of charges, ranging from membership of an underground "terrorist organisation" (dubbed Ergenekon) to arson, illegal weapons possession, and plotting an insurrection against Mr Erdogan's AKP, which came to power in 2002.
Two MPs in the secularist Republican People's Party (CHP) - Mustafa Balbay and Sinan Aygun - were jailed for 34 years and 13 years respectively. Another CHP member, Mehmet Haberal MP, was initially jailed but then released on time served in custody.
The court acquitted 21 other people. Outside the courthouse, police fired tear gas to disperse hundreds of secularist supporters of the defendants.
What is the background to the alleged plot?
Ergenekon is the name given to what prosecutors claim is a shadowy network of ultra-nationalists and secularists in Turkey with high-level military and security connections, deemed to be hostile to the AKP because of its perceived Islamist roots. The network is accused of allegedly plotting to undermine and topple the AKP government.
The Ergenekon investigation dates back to 2007 when a cache of explosives was found in the home of a former military officer and tied by state prosecutors to what they said was a much larger conspiracy. It led to the arrest of some 200 people, including senior military officers.
Ergenekon refers to a mythical Central Asian valley said to be the ancestral home of the Turks.
What was Gen Basbug's alleged role?
He was charged with setting up and leading a terrorist group aimed at trying to overthrow the government.
His arrest came after he was questioned as a suspect in an Istanbul court as part of an inquiry into an alleged internet campaign to discredit and destabilise the government.
Gen Basbug denied all the charges and was quoted as saying they were "tragicomic". Quoted by his lawyer, he argued that, if he had wanted to bring down the government, as commander of a powerful army there would have been other ways of doing it rather than resorting to using the websites.
What does the investigation say about relations between the ruling AKP and the military?
The investigation reflects a deep hostility and suspicion between two poles of Turkey's society and political establishment.
On the one hand members of Turkey's military elite and their allies see themselves as custodians of Turkey's secular constitution and are deeply suspicious of the religious intentions of the AKP government. Some fear that moves to remove the partial ban on headscarves for women, for instance, and restrictions on alcohol, could be the first steps towards establishing an Islamic republic.
On the other hand Prime Minister Erdogan and his supporters argue his government - popularly elected - represents modern democratic Turkey, tolerant of moderate Islam, and must protect itself from those seeking a return to Turkey's past history of military coups and shadowy army influence.
The two surviving leaders of the 1980 coup - retired generals Kenan Evren and Tahsin Sahinkaya - went on trial on 4 April 2012. Both are ill and unlikely to go to jail. The trial - separate from the Ergenekon case - was seen as a landmark for Turkey.
It's a long-running investigation with many strands and hundreds of arrests - is the judiciary getting bogged down in it?
Many people would say yes. The investigation has lasted more than five years and spiralled into multiple inquiries and led to hundreds more arrests, including for another alleged conspiracy dubbed "Operation Sledgehammer", which prosecutors said was planning to use terrorist acts to create conditions for a military takeover.
When more than 200 officers were detained as part of Operation Sledgehammer in 2011 the heads of Turkey's army, navy and air force resigned in protest.
Last September, former army generals Cetin Dogan, Ozden Ornek and Ibrahim Firtina were sentenced to 20 years each.
Nearly 330 other officers - including some senior military figures - were also convicted for their involvement in the alleged coup plot. Thirty-four people were acquitted. All the defendants denied the charges.
The whole investigation was hugely controversial, with critics claiming it was politically motivated and being used by Mr Erdogan as a pretext to clamp down on a wide range of government critics.
What has been the Turkish public's reaction to this?
The public reaction has been mixed. Some commentators argue there is a real threat from the so-called "deep state" of the shadowy military elite which governed Turkey from behind the scenes for decades and must be stopped from returning to power.
Others warn that the current government, though it enjoys popular support and a comfortable majority in parliament, is falling into the very trap it seeks to avoid, of using the judiciary for political ends, undermining Turkish democracy.