Turkey’s foreign ministry, where I used to work, was famous for its strict hierarchy. The ministry prided itself with its two-centuries-old tradition and impeccable reputation.

But after the coup attempt in 2016, extensive purges have created an irreplaceable shortage of qualified cadres in almost all state institutions in Turkey, including the foreign ministry. More than one-third of the career diplomats were labeled terrorists and expelled.

As Hannah Arendt said seven decades ago, the worst kind of one-party state “invariably replaces all first-rate talents, regardless of their sympathies, with those crackpots and fools whose lack of intelligence and creativity is still the best guarantee of their loyalty.”

The most able and promising Turkish diplomats were replaced by internet trolls and others willing to make a scene and violate the laws of their host countries. It has become the new normal to see people beaten at Turkish consulates. Turkey’s reputable diplomatic tradition has collapsed.

The purged diplomats were serving abroad when the purge came down. They had their diplomatic passports and could go anywhere they wanted. Instead, when ordered after the coup attempt, they returned to Turkey. Then they were expelled, and their passports and the passports of their spouses were canceled so they could not seek a decent life abroad.

For three years, authorities failed to produce evidence that these diplomats had anything to do with the coup. And no one bothered to tell them why they were expelled.

Then, on Monday of last week, out of the blue, authorities ordered the arrest of 249 of the purged diplomats. More than 100 of them were detained in Ankara provincial police headquarters. Many analysts claimed that it was a message to former Prime Minister Ahmet Davutoğlu, who served as foreign minister between 2009 and 2014. Most of the purged diplomats had entered the ministry during his time.

Why did this happen? Davutoğlu has recently openly criticized Recep Tayyip Erdoğan after his electoral defeat in Istanbul. He has also signaled that he will form a new party to oppose Erdoğan. As a result, Erdoğan has labeled those diplomats who entered service under Davutoğlu as Gulenists, which in today’s context means they are traitors against Turkey.

The prosecutors responsible for this sham are acting in a manner surreal even by Turkey’s legal standards. The allegation is that these diplomats somehow cheated on their entrance exams. They are being disqualified because their English is not up to scratch.

But the idea of a colossal exam cheating scheme with Davutoğlu at the top is completely ridiculous. The foreign service in Turkey has a four-step exam marathon. To cheat on all four steps and thus pass would be impossible. Prosecutors will have to display great creativity to explain how it is possible for such cheating to go unnoticed when, in the last phase of the exam, candidates are interviewed by a panel of a dozen ambassadors in English for a full hour.

If this allegation were at all sincere, these ambassadors would have to be questioned first. They would have to be in on it. But the ambassadors continue to hold important posts — their role in this alleged scheme goes unmentioned.

What’s more, Erdoğan’s deputy minister at the time bragged on his blog about the educational backgrounds and qualities of these same diplomats now accused of cheating. Many of them graduated from the best universities in Turkey, having been taught most of their subjects in English. Other studied at the best American universities. The blog praising these diplomats is still up on the internet.

Things went from ridiculous to nasty when an opposition member of Parliament, Ömer Faruk Gergerlioğlu, tweeted on Sunday that more than 100 diplomats had been subjected to systematic torture and sexual assault, including rape with a truncheon, while in police custody. After Gergerlioğlu’s tweet, on May 27, the Ankara Bar Association appointed a team of lawyers to look into the allegations. Their findings revealed horrendous torture under police custody.

Diplomats were subject to naked interrogations, beatings, crawls in stress positions, and rape. Their lawyers are not allowed to see them. When one diplomat passed out, he was taken to hospital. Doctors refused to issue a report documenting the torture.

Later, in court, diplomats told the judge that they had been tortured, but the judge refused to put it on the record.

There were five diplomats in the foreign ministry, including myself, who graduated from Harvard. All five either ended up in jail or had fled the country.

Police raided my family's house in my hometown on Monday as well. If I were in Turkey, I would be, as a Harvard alumnus, being tortured right now and made to admit that I cannot speak English, just like my friends who graduated from Columbia, Johns Hopkins, Georgetown, Tufts, and other top American schools.

In 2014, Turkish diplomats in Mosul were taken as hostages by the Islamic State when it seized the Turkish Consulate. They were released after three months of captivity. ISIS did not torture them.

Turkish authorities did not hesitate to do to its best educated, most promising diplomats, for some little political gain, what ISIS had not dared.

M. Bahadır Gülle is a former Turkish diplomat and a visiting scholar at the University of Cologne.