By Ayla Jean Yackley and Ceyda Caglayan
SILIVRI, Turkey (Reuters) - A Turkish court on Monday sentenced a former military chief to life in prison and dozens of others including opposition members of parliament to long terms for plotting against the government, in a trial that has exposed deep divisions in the country.
Retired military chief of staff General Ilker Basbug was sentenced to life for his role in the "Ergenekon" conspiracy to overthrow the government of Prime Minister Tayyip Erdogan.
Announcing verdicts on the nearly 300 defendants in the case, the judges also sentenced three serving parliamentarians from the opposition Republican People's Party (CHP) to between 12 and 35 years in prison.
Prosecutors say an alleged network of secular nationalists, code-named Ergenekon, pursued extra-judicial killings and bombings in order to trigger a military coup, an example of the anti-democratic forces which Erdogan says his AK Party has fought to stamp out.
Critics, including the main opposition party, have said the charges were trumped up, aimed at stifling opposition and taming the secularist establishment which has long dominated Turkey. They say the judiciary has been subject to political influence in hearing the case.
The judges also passed life sentences on a former commander of Turkey's prestigious First Army, a retired gendarmerie commander, the leader of the leftist Workers' Party Dogu Perincek and high-profile journalist Tuncay Ozkan.
Six judges took it in turns to read the verdicts, sentencing defendants for membership of the "Ergenekon terrorist organisation." Booing by defence lawyers, opposition politicians and some journalists in court turned to applause as half of the defence lawyers stormed out in protest at the sentences.
"We are Mustafa Kemal's soldiers," the defendants and defence lawyers chanted in reference to Mustafa Kemal Ataturk, founder of the modern secular republic.
"Damn the AKP," they chanted of Erdogan's ruling Islamist-rooted AK Party.
Earlier, security forces fired tear gas in fields around the courthouse in the Silivri jail complex, west of Istanbul, as defendants' supporters tried to protest against the five-year trial, a landmark case in the decade-long battle between Erdogan and the secularist establishment.
With main access roads shut and protesters' buses prevented from reaching the area, hundreds of the defendants' supporters attempted to cross the fields to reach the court, but police with riot shields blocked their advance.
"The day will come when the AKP will pay the price," some chanted on the approach road to Silivri, where hundreds of riot police and paramilitary gendarmes were on duty.
"This is Erdogan's trial, it is his theatre," Umut Oran, an opposition parliamentarian with the CHP party, told Reuters.
"In the 21st century for a country that wants to become a full member of the European Union, this obvious political trial has no legal basis," he said at the courthouse.
Erdogan has denied interfering in the legal process, stressing the judiciary's independence. But he has criticised the prosecutors handling the case and expressed disquiet at the length of time defendants have been held in custody.
Among the 275 defendants accused in the case were military officers, politicians, academics and journalists. They deny the charges. Twenty-one of the defendants were acquitted as the court announced verdicts one by one.
Basbug criticised the court on his Twitter account after the verdicts were announced.
"If society questions the independence of judges in a country, if it harbours doubts about whether its judgements are lawful, you cannot claim there is supremacy of law in that country," he said.
"Those on the side of the truth and righteous, that is on the side of justice, have a clear conscience. That is how I am."
The threat of a coup is not far-fetched: the secularist military staged three coups in Turkey between 1960 and 1980 and pushed the first Islamist-led government out of office in 1997.
But Erdogan has chipped away at the army's influence since his AK Party came to power in 2002, including in the courts with the Ergenekon case and the separate "Sledgehammer" plot.
Last September, the court in Silivri jailed more than 300 military officers for plotting to overthrow Erdogan a decade ago in "Sledgehammer".
The government's control over NATO's second largest army was illustrated on Saturday when Ankara appointed new military commanders in an overhaul of the top ranks, forcing the retirement of a senior general regarded as a government critic.
The Turkish public initially welcomed the Ergenekon trial on the grounds it would bring to account the country's "Deep State" - an undefined network of secularists long believed to have been pulling the strings of power in Turkey.
As the court proceedings advanced criticism grew, however. The European Commission also expressed concern.
"We were all happy when this court case started because we thought it was an effort to clean up the Deep State. But we soon realised it was an effort to clean up political opponents," said Nedim Sener, an investigative journalist accused of links to Ergenekon and still on trial in a related case.
(Writing by Daren Butler; Editing by Nick Tattersall and Giles Elgood)