Turkey's Prime Minister Tayyip Erdogan has declared a three month long state of emergency. The swift measure is an attempt shore up last week's failed military coup and bring stability to the country. (Reuters)

Turkey declared a state of emergency on Wednesday, a move that President Recep Tayyip Erdogan said would enable the state to act faster against those who plotted a failed coup.

In a late-night televised address, Erdogan, who has been carrying out a large-scale purge of the country’s institutions, sought to reassure the country that the measure — which would be in force for three months — will protect democratic freedoms. But the move consolidates more power in the president’s hands, allowing him to rule by decree.

For the state of emergency to be implemented, the decision must be approved by parliament.

The United States and Europe have urged Turkey to follow the rule of law and maintain democratic order in the wake of the attempted power grab that saw a renegade part of the armed forces hijack aircraft and attack key military and government buildings last week. Turkey’s countermeasures have affected more than 50,000 people — judges, civil servants, military, police and others — as the country’s leaders seek to root out opponents and perceived internal dissent.

The government is presenting the measures as an effort to confront a wide-ranging conspiracy led by a U.S.-based Turkish cleric, Fethullah Gulen, a former ally of Erdogan whom Turkey accuses of running a terrorist organization. Critics, however, claim that Erdogan’s government is using the coup attempt as an excuse to eliminate the last vestiges of opposition to its rule.

CCTV footage released by the Turkish presidential palace shows attacks on government supporters and forces during the attempted coup on July 15. (Reuters)

“The cleansing is continuing, and we remain very determined,” Erdogan said. He described a “virus” within the Turkish military and state institutions that had spread like “cancer.”

Article 120 of the Turkish constitution allows for a state of emergency to be announced in the event of an act of violence intended to abolish democracy or cripple fundamental rights and freedoms, Erdogan said. The declaration will enable Turkey to “take the most efficient steps” in order to remove threats to “democracy, to the rule of law and to the freedoms of the citizens in our country,” he said.

The crackdown against alleged Gulenists has showed no signs of relenting and continued on Wednesday as Turkey issued a ban on professional travel for all academics, opened investigations into military courts and closed schools.

At least 262 military judges and prosecutors were suspended as part of an investigation by the Defense Ministry into all personnel in its judiciary, the private NTV broadcaster reported. The Education Ministry said it was closing 626 private schools and other institutions that are under investigation for “crimes against the constitutional order,” state-run Anadolu news agency reported.

Almost a third of Turkey’s top military generals have been charged in the coup plot. Turkish government officials have indicated that authorities may move to take more control over the armed forces.

The military has long seen itself as the guardian of secularism in this mostly Muslim country and has staged a series of coups in past decades, but its power has been gradually diminished. Thousands of Turks took to the streets to prevent another coup, but the crackdown has raised fears that Erdogan — who described the plot as a “gift from God” — will use it as an opportunity to make the government more authoritarian.

“The armed forces . . . will act in unison with the government,” Erdogan said, hinting that civil control of the military — long a subject of debate in Turkey — could be expanded.

According to a senior Turkish intelligence official, Turkish authorities have begun to arrest defense attaches stationed in several countries abroad who might have been involved with the attempted putsch.

Analysts have raised fears that Erdogan may be moving toward establishing a one-party state.

A Turkish intelligence official said he believes elements of the Gulen movement have infiltrated opposition political parties.

According to the official, Turkish intelligence estimates that at least 100,000 people were involved in planning the coup.

Gulen, the cleric accused of inspiring the coup attempt, has denied any link to the plot, implying instead that Erdogan staged it as part of a bid to consolidate power. Gulen lives in self-imposed exile in Pennsylvania, and his backers operate education networks in Turkey, the United States and elsewhere.

Turkey has requested Gulen’s extradition from the United States.

In Washington, Secretary of State John F. Kerry said the Justice Department has jurisdiction over the issue. “They will have to make their judgments applying our legal standards to whatever has been put forward,” he said.

The travel restrictions on educators officially apply to work-related trips, the state broadcaster TRT reported. “There are no restrictions to personal travel,” said a senior Turkish official, who spoke on condition of anonymity in line with government protocol. He described the travel ban as a “temporary measure.”

But some professors and others in academic fields claim that their administrators have told them they cannot leave the country for any reason. Several university professors also confirmed that their supervisors told them to cancel vacations and other leave plans indefinitely.

The travel ban came a day after more than 15,000 education workers were suspended and resignations were demanded for all university deans. Turkey has also revoked the licenses of 21,000 teachers.

Naylor reported from Istanbul. Carol Morello in Washington and Souad Mekhennet and Thomas Gibbons-Neff in Ankara contributed to this report.