Turkish lawmakers declared a three-month state of emergency Thursday, overwhelmingly approving President Recep Tayyip Erdogan's request for sweeping new powers to expand a government crackdown after last week's attempt military coup.

Parliament voted 346-115 to approve the national state of emergency, which will give Erdogan the authority to extend detention times for suspects and issue decrees that have the force of law without parliamentary approval, among other powers.

Erdogan, who had been accused of autocratic conduct even before this week's crackdown on alleged opponents, says the state of emergency will counter threats to Turkish democracy.

Even without the emergency measures, his government has already imposed a crackdown that has included mass arrests, mass firings and the closure of hundreds of schools. Erdogan said the new powers would allow the government to rid the military of the "virus" of subversion, blaming the coup attempt on a U.S.-based Muslim cleric, Fethullah Gulen. The cleric has strong denied any knowledge of the attempted coup.

"This is a state of emergency imposed not on the people, but on (the state) itself," declared Prime Minister Binali Yildirim. "We will, one by one, cleanse the state of (Gulen's followers) and eliminate those who are trying to harm the country."

Turkey immediately said it was partially suspending the European Convention on Human Rights, allowing it more leeway to deal with individual cases, by invoking an article most recently used by France and Ukraine. The Council of Europe said it had been informed of Turkey's decision, and that the convention will still apply, but that individual exceptions will be assessed on a case-by-case basis.

Since the July 15 coup attempt, the government has arrested nearly 10,000 people. In addition, over 58,880 civil service employees -- including teachers, university deans and police -- have been dismissed, suspended, forced to resign or had their licenses revoked, accused of being Gulen followers.

Turkish state media said Thursday that a further 32 judges and two military officers had been detained by authorities.

The main opposition Republican People's Party, CHP, slammed the state of emergency move as going too far.

Speaking ahead of the vote, CHP lawmaker Ozgur Ozel said the decision would amount to a "civilian coup" against Parliament and was a display of "ingratitude" to all the legislators who had gathered in the assembly Saturday to oppose the coup attempt.

Turkish Deputy Prime Minister Mehmet Simsek defended the move, saying he hoped the state of emergency would be short-lived. He said it would be used to go after "rogue" elements within the state and that there would have been "carnage in the streets" had the military coup succeeded.

"We owe it to our people to go after them," he said. "We will have a legal framework for it."

Simsek said that "standards of the European Court of Human Rights will be upheld," but didn't elaborate.

"There will be no curfews. There will be no restriction of movement other than for the suspects," Simsek said.

Under the Turkish Constitution, the emergency measures allow the government to "partially or entirely" suspend "the exercise of fundamental rights and freedoms," so long as that doesn't violate international law obligations. Lawmakers can sanction a state of emergency for a period of up to six months.

A state of emergency has never been declared nationwide although it was declared in Turkey's restive, Kurdish-dominated southeast between 1987 and 2002. There, governors imposed curfews, called in military forces to suppress demonstrations and issued search warrants.

Martial law was imposed across the country for three years following a successful military coup in 1980.

In other developments news, a soldier allegedly linked to the attack on a hotel where Erdogan had been vacationing during the foiled coup was arrested in southwestern Turkey, the state agency Anadolu reported Thursday. The lieutenant was one of about 30 soldiers said to be involved in the hotel attack in the resort of Marmais.

The attackers arrived minutes after Erdogan had left the hotel, according to official reports.

In Greece, a court sentenced eight Turkish military personnel who fled there aboard a helicopter during the coup attempt to two months in prison for entering the country illegally.

Turkey has demanded their return to stand trial for alleged participation in the coup attempt. The eight, who deny involvement, have applied for asylum in Greece, saying they fear for their safety if they are returned.

Countries around the world are keeping a close watch on developments in Turkey, which straddles Europe, the Middle East and Asia.

German Foreign Minister Frank-Walter Steinmeier said Thursday that the state of emergency should only last as long as it's "absolutely necessary."

Steinmeier said it's important that "the rule of law, a sense of proportion and commensurability are preserved" and that it's in Turkey's interest to "keep the state of emergency only for the duration that is absolutely necessary and then immediately end it."