Tens of thousands of demonstrators came out on the streets of Turkey's capital Ankara and other cities to show support for the goverment in the wake of a failed coup that grabbed world attention. 

On Sunday, huge crowds carrying Turkish flags streamed into Ankara's Kizilay Square and Taksim Square in Istanbul, the country's biggest city, after authorities called on the public to stay vigilant.

A call from President Recep Tayyip Erdogan that his supporters should take to the streets in the early hours of Saturday as the coup attempt unfolded proved vital to defeating the army faction behind it.  

Speaking on Monday to throngs of government supporters in Kizilay Square, Prime Minister Binali Yildirim thanked the Turkish people for defeating the coup in what he said was a defence of democracy. 

"No matter their political views, all parties came together arm-in-arm against the coup. They cried out together," Yildrim said. "This shows that when the matter at hand is the country, then everything else is incidental."


WATCH: What's behind Turkey's failed coup?


In an unusual show of unity, Turkey's four main political parties released a joint declaration during an extraordinary parliamentary meeting on Saturday, denouncing the plot to topple Erdogan.

"Those who bombed and fired shots against the people, those who attacked the people with arms can not be described as Turks, but they are criminals and terrorists wearing army outfits. They will face justice and pay a heavy price," Yildrim said.

Speaking after a huge purge against members of the army and the judiciary was launched, netting some 6,000 people so far, Erdogan said his government could consider reinstating the death penalty, which Turkey abolished in 2004 as part of reforms aimed at joining the European Union.

The 6,000 people in detention include 29 generals and 2,839 military personnel, a senior Turkish official told Al Jazeera. The state news agency, citing the office of the governor of Ankara, said 149 police personnel have been detained in the capital.

'Authoritarian rule'

The coup attempt became apparent late on Friday when, in dramatic scenes, tanks blocked bridges in Istanbul, jets were seen in the skies over at least two cities, and the parliament and the headquarters of the intelligences services were straffed with gunfire from attack helicopters. 

At least 265 people were killed and more than 1400 wounded. 

Erdogan has blamed a high-profile former ally who has since become a bitter rival, Fethullah Gulen, for the attempt. Gulen, who lives in exile in the US state of Pennsylvania, has denied any involvement. Turkey is expected to officially seek his extradition. 

US Secretary of State John Kerry said he had no evidence that Gulen was behind the plot  and urged Turkish authorities to compile evidence as quickly as possible so the US could decide whether Gulen should be sent back to Turkey.

READ MORE: Turkish political parties unite against coup attempt

Speaking to Al Jazeera, Marc Pierini, a former European Union ambassador to Turkey, said Turkish citizens clearly did not back the attempt and the military leaders involved had not understood that.

"What is of worry right now is that the failed coup attempt is likely to be used as an opportunity to reinforce authoritarian rule in Turkey," he said. 

Erdogan's AK Party, which has won five legislative elections in a row, has long had strained relations with a military that has a history of mounting coups to defend secularism, although it has not seized power directly since 1980.

He has said did not want to seek revenge against those behind the failed coup and that his government would act with "reason and experience".

Turkey rounds up thousands after failed coup


Source: Al Jazeera and agencies