ANKARA - Turkey imposed a three-month state of emergency on Thursday, strengthening state powers to round up suspects behind the failed military coup and suspending a key European rights convention.

The moves came in defiance of growing global alarm over the extent of legal retribution after the coup that unsuccessfully tried to unseat President Recep Tayyip Erdogan but ended with some 50,000 alleged sympathisers in state offices losing their jobs and around 9,200 suspects detained.

After marathon meeting of his national security council on Wednesday, Erdogan declared Turkey's first state of emergency since 2002, the year before he first came to power as prime minister.

It came into force on Thursday, almost a week after the rebel soldiers surged into the streets with tanks, bombing parliament and shooting protesters on a bloody night of turmoil that left 265 people dead.

Erdogan said it would allow Turkey to be cleared of "terrorists" linked to US-based Muslim preacher Fethullah Gulen, whom he accuses of orchestrating the failed coup from his leafy compound in Pennsylvania.

But Erdogan insisted democracy would "not be compromised" and lashed out at critics of the sweeping purge that has raised deep concerns about democracy and human rights in the key NATO member.

The extra powers, to restrict freedom of movement and other rights, were needed "to remove swiftly all the elements of the terrorist organisation involved in the coup attempt," Erdogan said.

Deputy Prime Minister Numan Kurtulmus said the special measures may only last up to 45 days, insisting that "we want to end the state of emergency as soon as possible".

Asked about whether the government may impose curfews, Kurtulmus said: "very clearly no. This is not a declaration of martial law."

But he also said Turkey will suspend the European Convention on Human Rights, saying France had done the same after being targeted by a string of jihadist attacks.

"The road to arbitrary rule, unlawful behaviour, feeding on violence, has been chosen," complained the opposition Peoples' Democratic Party (HDP).

"Society has been forced to choose between a coup or an undemocratic govt."

Erdogan, warning that his opponents may launch new provocations, has urged his supporters to remain in squares across the country in what he calls a "vigil" for democracy.

He spoke by video link at midnight to the flag-waving and jubilant crowds of supporters still filling squares nationwide.

Meanwhile, mobile phone users across Turkey received text messages sent by "RTErdogan" urging people to stay in the streets to resist "the terrorists".

"The owners of the squares are not the tanks.

The owners are the nation," said the message.

Kurtulmus said the coup had claimed a total of 265 lives, including 24 plotters and 241 citizens and members of the security forces who opposed them. Previously, the military had said over 100 coup plotters were killed.

Erdogan suggested there would be further detentions in the crackdown, which has already netted several widely known figures.

Late Wednesday, a court remanded in custody Ali Yazici, the president's aide-de-camp who looked after military protocol on state occasions and was regularly seen by Erdogan's side, on charges of supporting the coup.

Courts have remanded in custody 109 out of 125 generals and admirals detained so far. Some been seen bruised and wounded in images published by state media.

"Of course that does not mean we have come to the end of it," Erdogan told Al-Jazeera.

The Turkish leader has fired back at critics of the government actions, telling France's Foreign Minister Jean-Marc Ayrault - who had warned Erdogan not to use the failed coup as a carte blanche to silence his opponents - to "mind his own business".

"If he wants a lesson in democracy, he can very easily get a lesson in democracy from us," Erdogan told Al-Jazeera.

German Foreign Minister Frank-Walter Steinmeier stressed it was "vital that the state of emergency is limited for the required time and then immediately lifted".

"Only acts which are legally punishable can be targeted, not political opinion."

Austria said it will summon Turkey's ambassador to discuss Ankara's "increasingly authoritarian" behaviour while the OSCE said a crackdown on pro-Gulen media was the latest challenge to press freedom in the country.

Even before the coup bid, critics had voiced mounting concern about Erdogan's efforts to to silence his opponents and clamp down on the press.

Turkey has stepped up pressure on Washington to extradite Gulen, sending several "dossiers" it says are packed with evidence about his alleged involvement.

Gulen has urged Washington to reject the extradition call and dismissed as "ridiculous" the claim he was behind the botched coup.

Erdogan, asked if other countries could have been involved in the coup, told Al-Jazeera: "There could be."