Erdogan's government holds the "Gulenists" responsible for the attempted military coup last July, and they probably were. But he is exploiting the "state of emergency" (which he has just extended for another three months) to suppress all possible centres of opposition to his rule. Whatever their real views, they are all accused of being either pro-Gulenist or pro-terrorist.
The Gulenist menace has been inflated to preposterous proportions. Erdogan's deputy prime minister, Nurettin Canikli, said in a recent interview with the BBC that members of the group have "practically had their brains removed. They've been hypnotised. They're like robots. Each one of them is a potential threat. They could commit all sorts of attacks, including suicide bombs."
"For 40 years this terror organisation has infiltrated the furthest corners of the country -- ministries, all institutions and the private sector. It's not just the judiciary, courts, the police, the military. It includes education. In fact, education is the field that they have entered best," Canikli said. (Half of the 100,000 people who have been fired from government jobs worked in education.)
Erdogan now even blames the Gulenists for shooting down a Russian combat aircraft on the Syrian-Turkish border one year ago -- although at the time he proudly claimed that it was done on his orders. He also forgets to mention that he and Fethullah Gulen were once close allies dedicated to the task of "Islamising" the Turkish public services.
Their shared objective was to ensure that most of the jobs in the government's grant -- military officers, teachers, police, judges, the senior civil service -- were held by pious Muslims. This was a huge task, since, for almost a century, these jobs had largely been the preserve of secular Turks who thought that religion had no business in politics.
The change was accomplished by giving Gulenist candidates the answers to entrance exams, by manipulating military and judicial appointments, or just by the naked exercise of political power, and by 2016 it was an accomplished fact.
But eventually Gulen and Erdogan had a catastrophic falling out -- probably over which of them actually controlled these tens of thousands of deeply religious officials -- and Erdogan belatedly realised that he had created a hostile force in the heart of his own government apparatus.
He showed as little foresight in his dealings with the Turkish Kurds. In an earlier, more responsible phase of his political career Erdogan actually engineered a ceasefire with the PKK, the main and most violent Kurdish separatist group. But when he lost an election last year and needed to win back the Turkish ultra-nationalist vote, he did it by breaking the ceasefire and re-starting the war against the Kurds.
His clandestine support for the Islamist fanatics of Isis (now Islamic State) was equally foolish. In the end he came under such pressure from the United States, from Russia, and from Saudi Arabia that he was compelled to break the link -- and discovered that his erstwhile friends in Islamic State get very cross when they are spurned. Islamic State bombs go off in Turkey all the time. So he has alienated a lot of people, his plate is very full, and he urgently needs to thin out the number of his enemies. The failed July coup gave Erdogan an excuse for taking extreme action against them, and even against other domestic opponents.
This tragedy was not bound to happen: one man's ruthless ambition has derailed an entire country's promising future. It's not clear when, or even if, it will get back on track.
Gwynne Dyer is an independent journalist whose articles are published in 45 countries.