Turkey purged its police on Monday after rounding up thousands of soldiers in the wake of a failed military coup, and said it could reconsider its friendship with the United States unless Washington hands over a cleric Ankara blames for the putsch.

Turkish authorities moved swiftly to retaliate for Friday night's coup, in which more than 200 people were killed when a faction of the armed forces tried to seize power.

But the swift justice, including calls to reinstate the death penalty for plotters, drew concern from Western allies who said Ankara must uphold the rule of law in the country, a NATO member that is Washington's most powerful Muslim ally.

Thousands of members of the armed forces, from foot soldiers to commanders, were rounded up on Sunday, some shown in photographs stripped to their underpants and handcuffed on the floors of police buses and a sports hall. Several thousand prosecutors and judges have also been removed.

A senior security official told Reuters that 8,000 police officers, including in the capital Ankara and the biggest city Istanbul, had also been removed from their posts on suspicion of links to Friday's coup bid.

Thirty regional governors and more than 50 high-ranking civil servants have also been dismissed, CNN Turk said.

Prime Minister Binali Yildirim said 7,543 people had so far been detained, including 6,038 soldiers. Work was under way to purge the civil service.

Turkey blames the failed coup on Fethullah Gulen, a cleric based in the United States who has a wide following in Turkey and denies any involvement.

Ankara has demanded Washington hand him over. Washington says it is prepared to extradite him but only if Turkey provides evidence linking him to crime. Yildirim rejected that demand.

"We would be disappointed if our (American) friends told us to present proof even though members of the assassin organization are trying to destroy an elected government under the directions of that person," Yildirim said.

"At this stage there could even be a questioning of our friendship," Yildirim added.

Yildirim said 232 people were killed in Friday night's violence, 208 of them civilians, police and loyalist soldiers, and a further 24 coup plotters. Officials previously said the overall death toll was more than 290.

Around 1,400 others were wounded as soldiers commandeered tanks, attack helicopters and fighter jets in their bid to seize power, strafing parliament and the intelligence headquarters and trying to seize the main airport and bridges in Istanbul.

The coup crumbled after President Tayyip Erdogan, on holiday at the coast, phoned in to a television news program and called for his followers to take to the streets. He was able to fly into Istanbul in the early hours of Saturday, after rebel pilots had his plane in their sights but did not shoot it down.

On Sunday he told crowds of supporters, called to the streets by the government and by mosques across the country, that parliament must consider their demands to apply the death penalty for the plotters.

"We cannot ignore this demand," he told a chanting crowd outside his house in Istanbul late on Sunday. "In democracies, whatever the people say has to happen."

He called on Turks to stay on the streets until Friday, and late into Sunday night his supporters thronged squares and streets, honking horns and waving flags.

Turkey gave up the death penalty in 2004 as part of a program of reforms required to become a candidate to join the EU. Germany said on Monday that Turkey would lose its EU status if it reinstates the death penalty.

Yildirim said Turkey should not act hastily over the death penalty but could not ignore the demands of its people.

The bloodshed shocked the nation of almost 80 million, where the army last used force to stage a successful coup more than 30 years ago, and shattered fragile confidence in the stability of a NATO member state already rocked by Islamic State suicide bombings and an insurgency by Kurdish militants.

Western countries said they supported Erdogan's government but Ankara should abide by the rule of law.

"We stand squarely on the side of the elected leadership in Turkey. But we also firmly urge the government of Turkey to maintain calm and stability throughout the country," U.S. Secretary of State Kerry told a news briefing in Brussels where he attended a gathering of European counterparts.

"We also urge the government of Turkey to uphold the highest standards of respect for the nation's democratic institutions and the rule of law. We will certainly support bringing the perpetrators of the coup to justice but we also caution against a reach that goes well beyond that."

Referring to Gulen, Kerry called on Turkey to furnish evidence "that withstands scrutiny", rather than allegations.

EU foreign policy chief Federica Mogherini also called on Ankara to avoid steps that would damage the constitutional order.

"We were the first ... during that tragic night to say that the legitimate institutions needed to be protected," she told reporters on arrival at the EU foreign ministers meeting.

"We are the ones saying today rule of law has to be protected in the country," she said. "There is no excuse for any steps that take the country away from that."

Turkey's pro-Kurdish HDP opposition, parliament's third largest party, said it would not support any government proposal to reintroduce the death penalty. The main CHP opposition said the response to the coup attempt must be conducted within the rule of law and that the plotters should face trial.