ANKARA, Turkey — A court in southwestern Turkey sentenced 40 people to life in prison Wednesday, convicting them of charges that include attempting to kill President Recep Tayyip Erdogan during last year’s failed coup, Turkish state television TRT reported.
A total of 46 suspects — 37 of them former military personnel — have been on trial since February in the city of Mugla accused of attempted assassination, violation of the constitution, and other crimes against the state during the July 15, 2016, coup attempt.
The defendants were accused of using helicopters to attack the hotel in the resort of Marmaris where Erdogan and his family members were staying, killing two policemen. Erdogan had left the hotel shortly before it was attacked.
Turkey has blamed the coup on the movement led by US-based cleric Fethullah Gulen, whose followers are accused of infiltrating the military and other state institutions.
Gulen has condemned the coup attempt and has denied he was involved.
State television TRT said the court handed down life prison terms to 40 of the defendants. One defendant, a former lieutenant colonel, was acquitted.
Two others, including Erdogan’s former military aide, were sentenced to 18 and 15 years in prison.
The trial against Gulen, who was named as one of the defendants, and two other defendants who are on the run will continue separately, TRT reported.
The defendants denied the charges against them during the trial and some complained of an unfair trial while making their final statements before the verdicts were delivered, according to state-run Anadolu Agency.
‘‘I believe the ruling will be a premature one. I want to be tried again in courts where the rule of law is upheld,’’ the Anadolu news agency quoted former lieutenant Muhammet Burak Ipek as telling the court.
Other defendants insisted they were obeying orders from their superiors, the agency reported.
The trial was held at a trade center that was turned into a temporary court because the courthouse is too small to hold such a high-profile case.
The trial is one of several cases underway against coup plotters across Turkey.