Q&A: Turkey's military and the alleged coup plots
The former head of the Turkish armed forces, Gen Ilker Basbug, has become the biggest casualty yet of a huge crackdown on alleged conspirators against the government which has brought hundreds of military and security officers to trial.
The BBC's Bridget Kendall examines the issues behind the so-called Ergenekon plot and other related cases.
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 ruling Justice and Development (AKP) party 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.
What was Gen Basbug's alleged role?
Gen Basbug 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 army in Nato.
He is now in custody, 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.
His lawyer said his client was denying all charges and had appealed to reverse the custody order pending trial.
Gen Basbug was quoted as saying the charges were "tragicomic", and arguing 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 Prime Minister Recep Tayyip Erdogan's 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, but the trial itself - separate from the Ergenekon case - is 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 last year, the heads of Turkey's army, navy and air force resigned in protest.
The whole investigation is hugely controversial, with critics claiming it is politically motivated and being used by Prime Minister Erdogan as a pretext to clamp down on a wide range of government critics.
Hundreds of former and active military officials, prominent academics, journalists and lawyers have been detained. Many are still awaiting trial and some have not even been charged.
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.
Is it all proof of real reform in Turkey - ie an elected government breaking the military's power over government institutions?
There is no doubt that Turkey's military is a much weakened institution in the country today, in comparison to past history, when successive coups asserted the army's control over politics. The military says 58 serving generals and admirals are in jail and the arrest of General Basbug will be seen as a further blow.
But the charges against him of an anti-government conspiracy still have to be tested in the courts. So far it is not clear how compelling a case can be made from the evidence. And some say that it will also be a test of Turkey's judiciary, to see if they are prepared to withstand political pressure.