Warplanes are patrolling Turkey's skies days following the failed coup, in a sign that authorities fear the threat against the government is not yet over.

A senior official said F-16 jets guarded Turkish airspace overnight, after a faction within the military launched an attempted coup against President Recep Tayyip Erdogan late on Friday.

READ MORE: How Turkey crushed a coup after a night of violence

The state-run news agency, Anadolu Agency, said Mr Erdogan ordered the overnight patrol by F-16s "for the control of the airspace and security".

The coup plotters sent warplanes firing on key government installations and tanks rolling into major cities, but the rebellion - which was not supported by the military's top brass -was quashed by loyal government forces and masses of civilians who took to the streets.

At least 294 people were killed and more than 1,400 wounded in the rebellion which took the government - and much of the world - by surprise.

On Sunday, Prime Minister Binali Yildirim said the coup had failed and life had returned to normal. But he and other officials also urged people to take to streets at night, saying risks remained in its aftermath.

The Herald:

At nightfall, thousands of flag-waving people rallied in Istanbul's Taksim Square, Ankara's Kizilay Square and elsewhere.

Mr Erdogan stayed in Istanbul despite statements that he would return to the capital and address crowds in Kizilay Square. News reports said close to 2,000 special forces police officers were deployed in Istanbul to guard key installations.

The government moved swiftly in the wake of the coup to shore up its power and remove those perceived as enemies, detaining some 6,000 people including a number of generals.

As the cabinet prepared to meet for its first regular session since the attempt, security forces continued raiding military facilities in search of suspected plotters. They searched the Air Force Academy premises and residences in Istanbul early on Monday, Anadolu reported. It was not clear if any arrests were made.

The crackdown targeted not only generals and soldiers, but a wide swathe of the judiciary that has sometimes blocked Mr Erdogan, raising concerns that the effort to oust him will push Turkey even further into authoritarian rule.

READ MORE: Marianne Taylor: Attempted coup leaves Turkey on the edge

The failed coup and the subsequent crackdown followed moves by the president to reshape both the military and the judiciary. He had indicated a shake-up of the military was imminent and had also taken steps to increase his influence over the judiciary.

It is not clear how the post-coup purge will affect the judiciary, how the government will move to replace the dismissed judges and prosecutors, or where the trials for those detained would be held.

The Herald:

Deputy Prime Minister Numan Kurtulmus defended the crackdown on judiciary officials in an interview with CNN-Turk, saying many of them would have played a role had the coup attempt succeeded.

"All of these (judiciary officials) did not necessarily have first-degree knowledge about this pro-junta initiative. Had they succeeded (with the coup) it is clear that these people would have been included into this business. Therefore, anyone connected to this group will be exposed."

The government alleged that the coup conspirators were loyal to moderate US-based cleric Fethullah Gulen, whom Mr Erdogan has often accused of trying to overthrow the government.

PM Mr Yildirim said those involved with the failed coup "will receive every punishment they deserve".

Mr Erdogan suggested that Turkey might reinstate capital punishment, which was abolished in 2004 as part of the country's bid to join the European Union.

Even before the weekend chaos in Turkey, the Nato member and key Western ally in the fight against the Islamic State group had been wracked by political turmoil which critics blamed on Mr Erdogan's increasingly heavy-handed rule. He has shaken up the government, cracked down on dissent, restricted the media and renewed fighting with Kurdish rebels.

Gulen, who lives in Saylorsburgh, Pennsylvania, espouses a philosophy which blends a mystical form of Islam with democracy. He is a former Erdogan ally turned bitter enemy who has been put on trial in his absence in Turkey, where the government has labelled his movement a terrorist organisation. He strongly denies the government's charges.

READ MORE: How Turkey crushed a coup after a night of violence

US Secretary of State John Kerry said the United States would entertain an extradition request for Gulen, but Turkey would have to present "legitimate evidence that withstands scrutiny." So far, officials have not offered evidence he was involved.