THRONGS of relatives and lawyers pushed their way past a metal barrier manned by security guards, fighting for a spot in the crowded courtroom. The area where the accused sat was crowded, too. The 17 journalists whose trial began on July 24th were the core of the editorial staff of Cumhuriyet, Turkey’s oldest newspaper and one of the few media outlets that has refused to play by the rules of Recep Tayyip Erdogan, the country’s autocratic president. In a case widely considered a perversion of justice even by Turkish standards, they face prison terms of up to 43 years for “assisting an armed terrorist organisation”.

For one of the accused, Ahmet Sik (pictured on poster), this is far from his first trial. Mr Sik has been a thorn in the side of the state for decades. In the 1990s he investigated disappearances in the Kurdish south-east, torture in prisons and killings of journalists (including that of a friend, Metin Goktepe, by police officers). He was prosecuted for defaming the military, the government and individual politicians. In the 2000s he was one of the first to document the penetration of Turkey’s security forces by an Islamist brotherhood known as the Gulen movement. When he tried to publish his findings in 2011, police seized copies of his book; prosecutors linked to the Gulenists had him thrown in prison. He stayed there for over a year.

At the time, Mr Erdogan’s government, which had made common cause with the movement, defended his arrest. “Sometimes a book is more dangerous than a bomb,” Mr Erdogan said. Mr Sik’s warnings turned out to be prescient. The government and the Gulenists fell out in 2013. Gulen followers in the army are widely believed to have spearheaded an attempted coup in July last year.

Mr Sik’s foresight did not spare him from Mr Erdogan’s subsequent wrath. Over 50,000 people have been jailed in the purges that followed the attempted coup. In January Mr Sik found himself back in the same prison where he was held years ago, joining ten colleagues from Cumhuriyet. They are allowed only an hour a week with their lawyers, says his wife, Yonca Verdioglu, and the meetings are recorded by camera and overseen by a guard. Mr Sik cannot send or receive letters. Absurdly, the journalists are accused of abetting the Gulen movement, the very group many of them helped expose.

Akin Atalay, the paper’s CEO, who has spent nearly nine months in detention, says the trial is intended both to silence Cumhuriyet and to intimidate others. The indictment, written in the kind of newspeak increasingly popular with Turkish officials, claims that the Cumhuriyet journalists prepared the ground for the coup by turning public opinion against the government. A former editor is alleged to have done so by documenting covert arms shipments to Syrian insurgents by Turkey’s intelligence agency. A veteran columnist is accused of “attempting to create the impression of the existence of an authoritarian government in Turkey”.

The bulk of the evidence against the journalists consists of their writing. Many are accused of corresponding with people who had downloaded a messaging app popular with Gulen supporters, known as ByLock. Simply receiving text messages from people who subsequently turned out to be ByLock users is treated as evidence of guilt. Users of the app have been sacked and arrested en masse. In a twist no longer considered out of the ordinary, one of the prosecutors behind the Cumhuriyet investigation has turned up as a Gulenist suspect in a separate case.

Ruling-party officials who once ignored warnings about the Gulenists now complain that the world does not take their concerns about the group seriously. They are not doing themselves any favours. In recent weeks Turkish police have detained at least 15 people for wearing T-shirts with the word “Hero”, on suspicion that this was a secret message of support for the Gulenists. They have also arrested ten human-rights activists, including the head of the Turkish branch of Amnesty International, Idil Eser, and a German national, Peter Steudtner, on terrorism charges.

That prompted a huge row with Germany. Germany’s foreign ministry warned against travel to Turkey, proposed freezing EU assistance and suggested rolling back credit guarantees to companies doing business in Turkey. Officials in Berlin revealed that their Turkish counterparts had asked them to probe nearly 700 German companies, including Daimler, Siemens and Volkswagen, for links to terrorist groups. Turkey has since withdrawn the demand.

Mr Sik’s opening statement at the Cumhuriyet trial was a blistering counter-indictment of Mr Erdogan, whom he accused of a “pogrom” against freedom of thought. It was also an ode to journalism’s power. “I have managed to offend the judiciary of every government and of every period,” he said, continuing: “The irreconcilable contradiction between us [journalists] and those who want to drown the truth will never end.” Observers see the trial as a chance for the justice system to assert itself against an authoritarian government. Mrs Verdioglu sees little hope of that. “There is no law left in this country,” she says.