Istanbul: Turkey has released more than 750 soldiers detained after an abortive coup, state media reported on Saturday, while President Tayyip Erdogan said he would drop lawsuits against people who had insulted him, in a one-time gesture of "unity".

More than 60,000 people have been detained, removed or suspended over suspected links with the failed putsch, when a faction of the military commandeered tanks, helicopters and fighter jets and attempted to topple the government.

Turkey`s Western allies have condemned the coup, in which Erdogan has said 237 people were killed and more than 2,100 were wounded, but have been rattled by the scale of the resulting crackdown which has targeted supporters of Fethullah Gulen.

The U.S.-based Muslim cleric, accused by Ankara of masterminding the July 15-16 putsch, denies the charges and Erdogan`s critics say the president is using the purges to clamp down on dissent.

Erdogan, meanwhile, has said it was "shameful" that Western countries showed more interest in the fate of the plotters than in standing with a fellow NATO member and has upbraided Western leaders for not visiting after the putsch. U.S. chairman of the Joint Chiefs of Staff Joseph Dunford, a top military official, is due to visit Turkey on Sunday.

State-run Anadolu Agency reported that 758 soldiers were released on the recommendation of prosecutors after giving testimony, and the move was agreed by a judge.

Another 231 soldiers remain in custody, it said.

Turkey`s military, the second-largest in NATO, has been hard hit in the wake of the coup, with about 40 percent of all generals and admirals dismissed.

On Thursday, 99 colonels were promoted to the rank of general or admiral, following the dishonourable discharge of nearly 1,700 military personnel.

Turkish Defence Minister Fikri Isik told broadcaster NTV on Friday that the shake-up was not yet over, adding that military academies would now be a target of "cleansing".

Turkey`s military is already stretched, facing violence in the mainly Kurdish southeast, and Islamic State attacks on its border with Syria.

The army killed 35 Kurdish militants after they attempted to storm a base in the southeastern Hakkari province early on Saturday, military officials said.

The head of the pro-Kurdish opposition told Reuters that the government`s chance to revive a wrecked peace process with Kurdish rebels has been missed as Erdogan taps nationalist sentiment to consolidate support.

In an unexpected move, Erdogan said late on Friday he would drop, as a one-off gesture, all lawsuits filed against people for insulting him. He said the decision was triggered by feelings of "unity" against the coup attempt.

It could also be aimed at silencing his Western critics. Prosecutors have opened more than 1,800 cases against people for insulting Erdogan since he became president in 2014, the justice minister said earlier this year. Those targeted include journalists, cartoonists and even children.

It was not immediately clear whether Erdogan would also drop his legal action against German comedian Jan Boehmermann, who earlier this year recited a poem on television suggesting Erdogan engaged in bestiality and watched child pornography, prompting the president to file a complaint with German prosecutors that he had been insulted.

European leaders worry that their differences with Erdogan could prompt him to retaliate and put an end to a historic deal, agreed in March, to stem the wave of migrants to Europe.

"The success of the pact so far is fragile. President Erdogan has several times hinted he wants to terminate the agreement," European Commission President Jean-Claude Juncker told Austria`s Kurier newspaper in an interview, when asked if the pact could fall apart.

Erdogan criticised the European Council and the European Union, which Turkey aspires to be a part of, for failing to visit to offer condolences, saying their criticism was "shameful".

Erdogan has blamed Gulen for masterminding the attempted coup and has called on Washington to extradite him. Turkish officials have suggested the United States could extradite him based on strong suspicion, while President Obama last week insisted Turkey must first present evidence of Gulen`s alleged complicity.

On Saturday, 56 employees of Turkey`s constitutional court were suspended from their jobs as part of the investigation into the alleged coup, private broadcaster Haberturk TV reported.

Among those, more than 20 court reporters were detained, it reported.

The number of public sector workers removed from their posts since the coup attempt is now more than 66,000, including some 43,000 people in education, Anadolu reported on Friday.

Interior Minister Efkan Ala said more than 18,000 people had been detained over the failed coup, and that 50,000 passports had been cancelled. The labour ministry said it was investigating 1,300 staff over their possible involvement.

Erdogan has said that Gulen harnessed his extensive network of schools, charities and businesses, built up in Turkey and abroad over decades, to create a "parallel state" that aimed to take over the country.

The government is now going after Gulen`s network of schools and other institutions abroad. Since the coup, Somalia has shut two schools and a hospital believed to have links to Gulen, and other governments have received similar requests from Ankara, although not all have been willing to comply.