ANKARA, Turkey - A Turkish court sentenced hundreds of military and civilian personnel at an air base to life prison sentences Thursday, proclaiming them guilty of involvement in the 2016 failed coup attempt against President Recep Tayyip Erdogan's government.

A total of 475 defendants, including some generals and fighter jet pilots at the Akinci air base, on the outskirts of the capital, Ankara, had been on trial for the past three years, accused of directing the coup and bombing key government buildings, including a section of Turkey's parliament.

The massive trial was one of two main trials against suspected members of a network led by U.S.-based cleric Fethullah Gulen, whom Ankara accuses of orchestrating the failed attempt.

Gulen, who was also named among the defendants, has denied involvement in the coup that resulted in around 250 deaths and injured thousands. About 30 coup-plotters were also killed.

The court convicted four men - civilians accused of liaising between Gulen's movement and some military officers - of crimes against the state, attempts to kill the president as well as 77 counts of murder, and sentenced them to 79 separate “aggravated” life sentences without the possibility of parole. Fifteen officers, including one-star generals, were also sentenced to the same term.

All 19 were held responsible for the deaths of nine people who were killed by gunshots and 68 people who died in aerial attacks on the parliament building, a police special operations headquarters, the Ankara police department and an area close to Erdogan's presidential complex.

A total of 337 other defendants were also sentenced to life prison terms. The court acquitted 70 of the defendants of all charges. Other defendants received prison terms ranging between six and 16 years.

The court ruled that Gulen, an alleged top operative in his movement and four other defendants still wanted by the Turkish authorities, should be tried separately over the charges.

The defendants were expected to appeal Thursday's verdicts, which were welcomed by members of Erdogan's ruling party.

“We are experiencing the joy of seeing the defendants, who were already put on trial by the public's conscience, receive their punishment,” the state-run Anadolu Agency quoted Leyla Sahin Usta, a deputy chairman of the ruling party as saying. “This is the end of the era of coups in Turkey.”

Busra Taskiran insisted that her fiance, Yunus Kilicaslan, who was a trainee F-16 pilot at the time of the coup, was wrongly accused.

Kilicaslan and other trainee pilots were “convicted today for life despite not taking part in the coup attempt, despite not taking part in any activity that night, despite fighting (against the coup) by locking themselves in a room,” she told the Associated Press.

Taskiran said: “They are very young, when they were thrown in prison, they were 24 and 25, now they are convicted for life? How do you explain this in the spirit of justice?”

The father of another convicted trainee pilot, Alper Kalin, said the court had failed to consider evidence that pointed at some trainee pilots' innocence.

“We are not happy with this verdict. We will carry this to the appropriate places,” said Ali Kalin.

Prosecutors accused the coup-plotters of using Akinci air base as their headquarters. Turkey's then military chief, Gen. Hulusi Akar, who is the current defence minister, and other commanders were held captive for several hours at the base on the night of the coup.

The prosecutors charged the defendants with attempts against the state and constitutional order, an attempt to assassinate the president, leading a terrorist organization and murder, among other charges.

The trial, which opened on Aug. 1, 2017, was part of a post-coup crackdown that has imprisoned around 77,000 people and seen another 130,000 fired from their government jobs.

On the opening day, dozens of the defendants were paraded into the courthouse handcuffed, with two paramilitary police officers on each arm, as some protesters threw stones and shouted “Murderers!”