Turkey's higher education council has banned academics from leaving the country and ordered those abroad to return home, after a military coup failed to topple the government. The measure comes amid a purge of military and state officials following Friday's failed attempt to wrest control of the government from President Recep Tayyip Erdogan.

More than 50,000 state officials have been sacked or suspended. Among them are 1,577 university deans, who have been asked to resign in addition to 21,000 teachers and 15,000 education ministry officials.

Ninety-nine generals have been charged in connection with the coup, which the government claims was masterminded by US based cleric Fethullah Gulen.

"It is a temporary measure that we were compelled to take due to flight risk of alleged accomplices of coup plotters in universities," a Turkish official told Al Jazeera on Wednesday. "Universities have always been crucial for military juntas in Turkey, and certain individuals are believed to be in contact with cells within the military," the official said.

At least 290 people were killed in the attempted coup, including plotters, civilians and police officers.

Turkey coup Recep Tayyip Erdogan
Supporters of President Erdogan hold an effigy of US-based cleric Fethullah Gulen hanged by a noose, in a pro-government demonstration in Istanbul's Taksim Square Alkis Konstantinidis/Reuters

Human-rights group Amnesty International warned that the purges are being used to silence journalists and government critics.

"We are witnessing a crackdown of exceptional proportions in Turkey at the moment. While it is understandable, and legitimate, that the government wishes to investigate and punish those responsible for this bloody coup attempt, they must abide by the rule of law and respect freedom of expression," Amnesty's Turkey researcher Andrew Gardner said.