ISTANBUL - Turkey widened its massive post-coup purge to the media and schools after vowing to root out supporters of an exiled cleric it accuses of orchestrating the attempted power grab.

Global alarm is mounting over the retaliatory action since Friday's failed putsch, which has already seen a massive crackdown in the military, police and judiciary and thousands detained.The authorities acted swiftly - cancelling licences for radio and television stations said to be linked to the so-called Gulenists.

Around 50,000 soldiers, police, judges, civil servants and teachers have been suspended or detained since the coup attempt, stirring tensions across the country of 80 million which borders Syria's chaos and is a Western ally against Islamic State.

The authorities shut down media outlets deemed to be supportive of the cleric and said 15,000 people had been fired from the education ministry, 492 from the Religious Affairs Directorate, 257 from the prime minister's office and 100 intelligence officials.

Turkey's education board also demanded the resignation of almost 1,600 deans from private and state universities.

Already, around 9,000 people including police and government officials have been sacked and 7,500 people detained including top generals accused of masterminding the plot.

Erdogan spokesman Ibrahim Kalin defended the mass detentions, saying it was a legal process and that suspects would face charges of "treason and attempting to change the constitutional order". Yildirim warned Turks against exacting revenge on backers of the attempted overthrow, after disturbing pictures emerged of rough treatment meted out to suspects. "Nobody can have a feeling of revenge. This is unacceptable in a state governed by rule of law."

Ankara says Gulen, who wields enormous influence in Turkey through supporters in various sectors as well as a private pre-university education network, hatched the plot to end Erdogan's 13 years in power.

Gulen, 75, has rejected the allegations, saying Erdogan himself may have staged the putsch, an idea dismissed by the presidency as "nonsensical".

Turkey's anxious Western allies have told Ankara to abide by the rule of law amid fears about a worsening state of democracy and human rights in the strategic NATO nation. Erdogan's suggestion that the death penalty could be reinstated has also sent shudders through Europe, with the EU warning such a move would be the nail in the coffin of Turkey's already embattled bid to join the bloc.

The escalating purges have hit financial markets, with the currency plunging to around three liras to the dollar, after the central bank cut interest rates and Moody's said it was reviewing Turkey for a possible downgrade.

An Ankara court on Monday charged and detained 26 former generals over the putsch, including former air force chief General Akin Ozturk.

Ozturk has been painted by some Turkish media as the mastermind but denied the claims and said he did not know who was behind it.

The coup bid was the most serious threat to Erdogan since he took power first as prime minister in 2003, and saw rebel troops close down bridges in Istanbul, parliament bombed from the sky and protesters shot in the streets.

It has raised deep concerns about the stability of the strategic Nato partner, which has a key base used in the US-led fight against the Islamic State group and which houses a large nuclear weapons stockpile.

A total of 208 people were killed, including 145 civilians, 60 police and three soldiers, along with 104 coup plotters, the government and army says.

The military has often had strained relations with Erdogan's Islamo-conservative government as the traditional guardians of Turkey's secular system and has carried out coups in the past.

It said the vast majority of its members had nothing to do with Friday's plot and that the "traitors" would be punished severely for the "humiliation and disgrace" of the Turkish republic.

UN rights chief Rights Zeid Ra'ad Al Hussein urged a fair trial for the suspects and voiced "serious alarm" over the mass suspension of judges.

Turkey has piled the pressure on Washington to extradite Gulen, adding to tensions between the two governments already frayed by differences over Syria.

The reclusive cleric said in an interview at his Pennsylvania compound that he had no concerns about the extradition request.

"The rule of law reigns supreme here. I don't believe this government will pay attention to anything that is not legally sound."

He called the putsch attempt "treason, a betrayal of the Turkish nation."

Some 1,500 finance ministry officials have also been removed from their posts. Annual leave has been suspended for more than three million civil servants, while close to 3,000 judges and prosecutors have also been purged. A court remanded 26 generals and admirals in custody on Monday, Turkish media said.

Erdogan has remained in Istanbul since he flew back on Saturday from the holiday resort of Marmaris where he was staying when the coup struck.

The president, who critics have long accused of becoming increasingly autocratic, has spoken to supporters every night, urging them to maintain a "vigil" for democracy.

He told CNN his life had been in grave danger. "If I stayed (in Marmaris) 10, 15 minutes more, I would either have been killed or kidnapped and taken away by them."