Istanbul (CNN) -- A criminal court in Turkey brought the hammer down hard on hundreds of acting and retired senior military commanders, found guilty of plotting to overthrow the government, state media reported Friday.
Three-hundred-thirty of the 365 suspects were sentenced to up to two decades behind bars, in a trial reflecting the relatively new reduction of military influence in the nation's political landscape.
Former air force commander Ibrahim Firtina, former head of the navy Ozden Ornek and an ex-army commander named Cetin Dogan had their initial life sentences reduced to 20 years, according to state media.
Analysts say the plot -- widely referred to as Balyoz, or "Sledgehammer" in English -- further reinforces the shift in a balance of power oriented toward more civilian authority.
Six other generals and one former member of parliament were sentenced to 18 years in prison, while 34 others were acquitted and another defendant was separated from the case.
Dozens of military commanders -- once considered untouchable in Turkish society -- have been in prison for more than two years as the controversial trial dragged on.
"The decision seems to be designed to set a precedent and give a strong signal to the armed forces that the days of meddling in politics are over," wrote Suat Kiniklioglu, a senior member of Turkey's ruling Justice and Development Party, in an e-mail to CNN.
"Anyone attempting to discredit or overthrow a democratically-elected government in the future will think twice. ... I think it is clear the judiciary is intent on consolidating the gains it made over the deep state and its military wing in recent years."
From outside the remote prison on the outskirts of Istanbul where the trial was held, Turkish television broadcast live images of despondent relatives after the verdict was announced. Some wept, while a woman could be seen being carried out of the building after she apparently collapsed.
If the sentences are upheld, some of the elderly former commanders are likely to live the rest of their lives behind bars.
"The murder of justice turned into a massacre of justice with the decision given today," a defense attorney named Huseyin Ersoz said, reading what he described as a joint statement from many of the defendants. "We have never betrayed our country, nation, state and flag." Related story: Will Turkey have soft landing or turbulence? The Sledgehammer investigation dates back to 2003 and marks a sizable setback for the once politically dominant Turkish armed forces, which have overthrown four governments in the last half-century.
The widely-watched trial demonstrated a victory in the ongoing power struggle between the country's long-ruling secular elite and the Islamist-inspired elected government of Prime Minister Recep Tayyip Erdogan.
Erdogan, who was jailed in the 1990s for reading a poem about Islam in public, sparred with military commanders during his first years in office.
But after handily winning consecutive elections, he has succeed in cowing the military during nearly 10 years in office, arguably becoming the most powerful politician Turkey has seen in generations.
In 2011, Erdogan enjoyed strong support in parliamentary elections, edging the nation away from its traditionally securalist leanings.
In a statement to journalists on Friday, Erdogan appeared to suggest the sentences could be diminished through an appeals process. "We have to watch and see the appeals process as well," Erdogan said. "Our wish is for a just decision to come out of this. But it has not come to an end yet because there is an ongoing process."
While the arrest of the generals was welcomed in some circles, other liberal voices in the Turkish media have criticized the conduct of the trial as well as the evidence presented.
"The sentence was too harsh and confirms the opinion of many people in Turkey who believe this was essentially an attempt to settle political scores with the ancien regime, as opposed to being a fair trial," said Asli Aydintasbas, a columnist with the newspaper Milliyet.
"This is not to whitewash the military role in Turkey's past. ... But some of the evidence presented in this case would not hold in a court of law in any other country."
Thought to be crucial to NATO interests given its geostrategic significance -- Turkey borders Iraq and Syria to the south and Russia to its northeast -- the stability of the country's democratic government has long remained a concern of foreign policy experts.
CNN's Talia Kayali contributed to this report