WERE he to return to Turkey in the near future, Celal Kalkanoglu (not his real name) would have to do so in handcuffs. “They will arrest me as soon as I land at the airport,” says the judge. On July 16th of last year, the day after an army faction attempted a coup against Recep Tayyip Erdogan, the president, Mr Kalkanoglu’s name appeared on a long list of officials to be dismissed and arrested. With the judge having left Turkey, the authorities went after his family. Some of his relatives were sacked from government jobs, he says, and barred from leaving the country.

More than 4,000 Turkish judges and prosecutors, a quarter of the total, have been dismissed by decree since last summer, mostly because of alleged links to the Gulenists, a secretive Islamic movement accused of leading the coup. The vast majority, including two members of the constitutional court, are in prison. Only a fraction have heard formal charges. Mr Kalkanoglu, who denies any affiliation with the Gulenists, says the government has used the coup as an excuse to step up a purge of the judiciary that began in late 2013, after a corruption scandal implicated cabinet ministers. “I have been blacklisted since 2014,” he says. Mr Erdogan describes the corruption claims as a Gulenist plot.

Don’t mention the purges

On May 16th Mr Erdogan had a friendly meeting in Washington with Donald Trump. As Turkish security guards beat Armenian and Kurdish protesters elsewhere in the city, Mr Erdogan asked Mr Trump to extradite Fethullah Gulen, the elderly cleric who runs the movement and has lived in Pennsylvania since 1999. The two leaders also discussed Syria, where Turkey is angry about America’s move to arm Kurdish militias fighting against Islamic State. No agreement was reached on either subject, but Mr Trump praised Turkey’s efforts in the fight against terrorism. He said nothing about Mr Erdogan’s increasingly autocratic rule, or about the crackdown that is hollowing out the rule of law in his country.

In the past, members of Mr Gulen’s movement took over parts of the judiciary and abused their power with the government’s blessing. In the late 2000s the Gulenists worked with Mr Erdogan’s Justice and Development (AK) party to sideline secular opponents, staging show trials that jailed hundreds of army officers, often on the basis of forged evidence. Many of the jurists now under arrest helped carry out that earlier wave of purges, says Mehmet Gun, head of Better Justice, a non-governmental group.

Yet Mr Erdogan’s new purge is even more extensive. A climate of paranoia has taken hold of the courts. Judges and prosecutors are constantly looking over their shoulders, says Metin Feyzioglu, head of the Union of Turkish Bar Associations. “Justice is now vested in a judge’s personal bravery,” he says. Those who defy Mr Erdogan pay a high price. When one court decided to release 21 journalists accused of Gulenist sympathies from pre-trial detention earlier this spring, three of its judges were suspended. Their ruling was overturned within 24 hours.

Things are not about to get better. Under a new constitution, adopted by the thinnest of margins in a referendum in April marred by allegations of fraud, members of top judicial panels will no longer be elected by their peers but appointed by Mr Erdogan and parliament, which is controlled by the AK party. The old system allowed groups like the Gulenists to flourish. The new one places the judiciary under Mr Erdogan’s thumb. According to one opposition lawmaker, out of 900 recently appointed judges, 800 have AK links. “As long as elections to top positions are not tied to objective rules, depoliticising the judiciary will be impossible,” says Hasim Kilic, a chief justice at Turkey’s constitutional court until 2015.

Meanwhile, cases related to the crackdown, under which some 50,000 people have been arrested and more than 110,000 fired, are flooding in. The constitutional court has received 75,000 applications for redress since the attempted coup last July, but has declined to hear any case related to the state of emergency. Instead, the judiciary seems to have other priorities. In late April a Turkish court blocked access to Wikipedia because some of its posts suggested that the government had supported jihadists in Syria. Two weeks earlier a prosecutor wildly accused several American officials, including a senator, a former CIA chief and a former prosecutor, of involvement in the coup. Perhaps Mr Erdogan’s warm new relations with Mr Trump will allow his magistrates to give that investigation a rest.