TEHRAN (Tasnim) – Turkey's appeals court upheld convictions on Wednesday of top retired military officers for leading a plot to overthrow Prime Minister Tayyip Erdogan's government a decade ago.

Relatives of the retired officers wept after the ruling and a defense lawyer said he would take the case to Europe's top human rights court.

The judges overturned convictions of dozens of less prominent defendants among more than 300 officers sentenced in September 2012 over the "Sledgehammer" conspiracy, said to have included plans to bomb Istanbul mosques and trigger an army takeover.

Turkey's armed forces, the second largest in NATO, were long the guardians of the secular republic established by Mustafa Kemal Ataturk, carrying out three coups between 1960 and 1980 and pushing an Islamist-led government from power in 1997, Reuters reported.

Since first coming to power in 2002, Erdogan's Islamist-rooted AK Party has reined in army influence with a series of reforms designed to boost democracy, while prosecutors have pursued suspected coup-plotters in the army through the courts.

The latest verdict underlines the extent to which Erdogan has brought the military to heel during his decade as prime minister, consolidating his power as he prepares for an election cycle starting next year which could see him become president.

In a packed courtroom, supporters of the defendants noisily voiced their anger at the upheld convictions as the chief judge spoke, chanting the secularist slogan "we are Mustafa Kemal's soldiers" and "Tayyip will answer to the people".

Dozens protested outside the court, waving Turkish flags adorned with Ataturk's picture. "We know well it is Ataturk being tried," said one banner held by the group, which then marched to Turkey's military headquarters before dispersing.

Defence lawyer Celal Ulgen said the court had accepted fabricated evidence as genuine and that the judiciary in Turkey was subject to political manipulation.