SILIVRI, Turkey — Turkish courts are just weeks from concluding some 300 mass trials intended to draw a line under the most traumatic event of Turkey’s recent history: the failed 2016 coup that killed 251 people, mostly civilians, and wounded more than 2,000.

So far, nearly 3,000 security personnel and civilians have been convicted, and the sweeping verdicts have been welcomed by the government and its supporters as justice served.

But the process has also widened political divisions in Turkey and deepened a sense of persecution among government opponents, who say the mass trials are emblematic of an increasingly arbitrary system of justice under President Recep Tayyip Erdogan.

More than two years after the coup attempt, Mr. Erdogan’s government continues to press its pursuit and prosecution of those suspected of being in league with the man it accuses of organizing the plot, the Muslim cleric Fethullah Gulen.

The crackdown has progressively widened to include an entire class of political opponents, as the government has purged tens of thousands from the judiciary and academia, as well as the police and military.

The arrests go on virtually weekly. On Tuesday, the authorities issued warrants for more than 1,100 people across 75 provinces over suspected links to the Gulen network, the semiofficial Anadolu news agency reported.

Many were accused of obtaining and passing along the questions of a written test to promote police officers, which the government has long alleged was part of an effort to seed the upper ranks of the security forces with Gulen followers.

Mr. Gulen, who lives in the United States, has also been indicted in the most prominent cases aimed at the top ranks of the coup plotters, but American officials say the evidence presented against him is not enough for his extradition.

The abundant evidence presented at the trials has put to rest any broad doubts that there was an organized plot to unseat Mr. Erdogan, who himself evaded capture that night. But human rights activists and government critics say the process — which includes trying 100 to 200 people at a time — has been so deeply flawed that it has muddied the case against the coup makers.

Tensions run high in many of the trials. Government supporters erupt with anger, hurling accusations when a defendant proclaims his innocence. Police officers and prison guards line courtrooms the size of sports arenas. The judges are often disdainful, addressing defendants in the familiar form of address, against court tradition. Critics complain they are far from impartial.

In a cavernous courtroom at a high-security prison outside Istanbul in December, victims’ families drummed their hands on the desks in muted approval as a judge declared 48 army officers guilty of treason and murder.

“If anyone should be ashamed, it is my commander, because he did not stand by me,” he ended bitterly.

Government supporters and families accuse many of the defendants of lying, and often shout insults during hearings. Lawyers for the victims point out that the ringleaders have denied from the start that there was a plan for a coup.

“It is an organized defense,” said Oguzkan Guzel, a lawyer for some of the veterans wounded in the coup attempt. “At the beginning of the Akinci base trial” — one of the most important aimed at the coup leaders — “they stood up and said we are not cooperating, and that set the stage.”

For their part, defendants and their lawyers accuse the government of violating their rights, including mistreatment and torture in the first days after the coup, and the use of false evidence and forced confessions.

The judges themselves are under pressure. Some 3,000 judges have been purged in the crackdown since the coup attempt. Some judges have been replaced mid-trial — itself a violation — often by inexperienced judges just out of law school.

“A judge in a city sees that other judges are in jail; the judges’ and prosecutors’ high board representative, who assigns judges, is in jail; so there is a climate of fear,” said Husamettin Cindoruk, a veteran lawyer and former government minister. “So there is a crisis of the judiciary.”

One exception may be Judge Oguz Dik, who presides over the most important of the cases dealing with the coup plot, including the prosecution of the officers who tried to take over the General Staff headquarters and held the chief of staff, Gen. Hulusi Akar, and others at gunpoint. Twelve people there were killed.