Turkey coup attempt: Who's the target of Erdogan's purge?
After the failed coup, the crackdown. The number of people arrested or thrown out of their jobs stretches into the tens of thousands.
From judges to teachers, civil servants to soldiers, the list is extensive.
There are very real fears among Turks about what will come next.
So who is being targeted and why?
As soon as it became clear that the coup had failed, the crackdown began - first with the security forces, then spreading to Turkey's entire civilian infrastructure. In the words of one Turkish columnist it was a "counter-coup" - a cleansing of the system, in the style of a coup, that had taken place in the past.
The express aim of the president is to "cleanse all state institutions". And the target is what he calls "the parallel state" - a movement headed by an arch-rival in self-imposed exile in the US, accused of plotting the coup.
No-one really knows how extensive that movement is, but followers of cleric Fethullah Gulen are suspected of infiltrating some of the posts closest to the president, including chief military aide Ali Yazici and air force adviser Lt Col Erkan Kivrak,
A "Gulenist clique" in the army was behind the coup, officials say. And they came so close, says the president, that they were within 10 or 15 minutes of assassinating or kidnapping him. More on the Gulenists later.
Who is being purged?
The purge is so extensive that few believe it was not already planned. And there seems little chance that everyone on the list is a Gulenist.
The sheer numbers are sobering. Some 9,000 people are in custody and many more are out of a job. Although accurate details are difficult to come by, this is the current list:
- 7,500 soldiers have been detained, including 118 generals and admirals
- 8,000 police have been removed from their posts and 1,000 arrested
- 3,000 members of the judiciary, including 1,481 judges, have been suspended
- 15,200 education ministry officials have lost their jobs
- 21,000 private school teachers have had their licences revoked
- 1,577 university deans (faculty heads) have been asked to resign
- 1,500 finance ministry staff have been removed
- 492 clerics, preachers and religious teachers have been fired
- 393 social policy ministry staff have been dismissed
- 257 prime minister's office staff have been removed
- 100 intelligence officials have been suspended
The list may be incomplete because the situation is constantly changing. But it is clear that the purge has affected well over 58,000 people.
President Erdogan has seen the rise of Islamic education in Turkey's schools and universities as a personal mission.
Since his Islamist-rooted party came to power in 2002, the number of children educated in segregated religious schools known as "Imam-Hatip" has soared by 90%. He has repeatedly said he wants to raise a "pious generation" and has reformed state education accordingly.
Read Selin Girit's account on the rise of Imam-Hatip schools: Turkish students fear assault on secular education
Mr Erdogan sought to reverse the many closures of religious schools that came in the wake of Turkey's last coup in 1997, which he compared to the cutting of an artery.
He has also moved to shut down Gulenist-run schools outside Turkey. Reports from Romania say Turkish officials have told 11 to close, but the schools argue they fall under Romanian rather than Turkish jurisdiction.
What is less clear is why university deans are also being targeted. The officials told to leave their posts are unlikely to be Gulenists. There is some suggestion that a revamp of Turkey's 300 universities is being prepared.
On Wednesday, Turkey's higher education authority banned academics from travelling abroad and said anyone currently outside Turkey should return home.
And why so many civil servants?
This could hark back to a 2010 cheating scandal in Turkey's civil service exams. When 3,227 were suspected of cheating because they scored top marks, the government suspected Gulenists.
The post-coup purge may be the time to get rid of the suspected cheats.
Another possibility is that the government is also weeding out opponents from Turkey's Alevi community, which numbers some 15 million.
Turkey's ruling AKP is predominantly a Sunni Muslim party which gains support from an Islamist base. The Alevi sect combines elements of Shia Islam with pre-Islamic folk customs.
What will Erdogan do next?
There are deep suspicions and widespread fears of what the president is planning next. He is expected to make a major announcement on Wednesday.
Some have compared the crackdown to the fallout of the military coup of 12 September 1980. But that resulted in executions and 600,000 detentions, so current events are far less dramatic.
There seems little chance of martial law being declared, as the army is so deeply damaged by the botched coup.
But emergency measures could be on the cards. Detention without charge could be extended and firing civil servants could be approved without the need for parliamentary approval.
Will there be curfews? That seems unlikely when it suits the government to have supporters on the streets at night.
Will the death penalty be reinstated 12 years after its abolition?
National security damaged by failed coup - by Doruk Ergun
So who is his arch-rival anyway?
President Recep Tayyip Erdogan's declared aim is to root out followers of a former ally, Islamic cleric Fethullah Gulen, who became his arch-rival and went into self-imposed exile in the US in 1999.
Fethullah Gulen has made a lot of enemies but he also has a large number of followers and they are accused of plotting the coup. Gulenists, who espouse a tolerant form of Islam, are thought to donate up to 20% of their income to the movement. They have roles in all sectors of Turkish society and local reports say some Gulenists have confessed to involvement in the attempted coup.
The order, one follower was quoted as saying, came from a civilian teacher known as Big Brother.
Exactly who is a Gulenist is very hard to assess, but President Erdogan blamed the movement for damaging corruption allegations that entangled the sons of several Turkish ministers in 2013.