A total of 40,029 people have been detained in Turkey on suspicion of involvement in last month's failed coup, prime minister Binali Yildirim has announced.
Of that number, 20,355 were later formally arrested on suspicion of links to the military-led uprising on July 15 against the administration of president Recep Tayyip Erdogan.
It comes after Turkey announced it was freeing thousands of prisoners early in what appeared to be an effort to clear space for an influx of political detainees linked to the coup.
The figures show that Turkey detained around 5,000 people over the coup over the last week alone amid what critics say is a crackdown on civil rights after the failed uprising.
Mr Yildirim also said that 79,900 people had been removed from public duty in post-coup purges of the military, police, civil service and judiciary.