Turkish fighter jets had President Recep Tayyip Erdogan's plane in their sights at the height of the attempt to overthrow him, but they did not fire.

The Turkish president was returning to Istanbul from a holiday near the coastal resort of Marmaris after a faction in the military launched a coup attempt on Friday night.

"At least two F-16s harassed Erdogan's plane while it was in the air and en route to Istanbul," a former military officer told Reuters. "They locked their radars on his plane and on two other F-16s protecting him."

"Why they didn't fire is a mystery," he added.

A senior Turkish official confirmed to Reuters that President Erdogan's Gulfstream IV jet was harassed while flying to Istanbul by two F-16s commandeered by the coup plotters.

Another senior official also told the agency the presidential business jet had been "in trouble in the air" but gave no further details.

In pictures: Turkey coup attempt Show all 17 1 /17 In pictures: Turkey coup attempt In pictures: Turkey coup attempt Turkish President Erdogan attends the funeral service for victims of the thwarted coup in Istanbul at Fatih mosque on July 17, 2016 in Istanbul, Turkey Burak Kara/Getty Images In pictures: Turkey coup attempt Soldiers involved in the coup attempt surrender on Bosphorus bridge with their hands raised in Istanbul on 16 July, 2016 Gokhan Tan/Getty In pictures: Turkey coup attempt A civilian beats a soldier after troops involved in the coup surrendered on the Bosphorus Bridge in Istanbul, Turkey, 16 July, 2016 REUTERS/Murad Sezer In pictures: Turkey coup attempt Surrendered Turkish soldiers who were involved in the coup are beaten by a civilian Reuters In pictures: Turkey coup attempt Soliders involved in the coup attempt surrender on Bosphorus bridge Getty In pictures: Turkey coup attempt Supporters of Turkish President Recep Tayyip Erdogan wave flags as they capture a Turkish Army vehicle Getty In pictures: Turkey coup attempt People pose near a tank after troops involved in the coup surrendered on the Bosphorus Bridge in Istanbul, Turkey, 16 July, 2016 Reuters In pictures: Turkey coup attempt Turkish soldiers block Istanbul's Bosphorus Brigde Getty In pictures: Turkey coup attempt A Turkish military stands guard near the Taksim Square in Istanbul Reuters In pictures: Turkey coup attempt Pierre Crom/Twitter In pictures: Turkey coup attempt Turkish soldiers secure the area as supporters of Recep Tayyip Erdogan protest in Istanbul's Taksim square AP In pictures: Turkey coup attempt People demonstrate in front of the Republic Monument at the Taksim Square in Istanbul Murad Sezer/Reuters In pictures: Turkey coup attempt Turkish soldiers detain police officers during a security shutdown of the Bosphorus Bridge Reuters In pictures: Turkey coup attempt Turkish Army armoured personnel carriers in the main streets of Istanbul Getty In pictures: Turkey coup attempt Chaos reigned in Istanbul as tanks drove through the streets EPA/TOLGA BOZOGLU In pictures: Turkey coup attempt Turkish President Tayyip Erdogan speaks to media in the resort town of Marmaris Reuters In pictures: Turkey coup attempt Supporters of President Erdogan celebrate in Ankara following the suppression of the attempted coup Reuters

Flight tracking websites showed the jet taking off from Dalaman airport, about an hour and a quarter's drive from Marmaris, around 10.40pm (GMT) on Friday.

It later circled in what appeared to be a holding pattern just south of Istanbul - around the time a Reuters witness at the airport reported still hearing bursts of gunfire - before coming in to land.

Following the failed coup, the government moved swiftly to shore up President Erdogan's power and remove those perceived as an enemy, saying on Sunday it had detained 6,000 people.

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.

Turkey's government vows to 'cleanse' military after failed coup

Conspiracy theorists are saying the attempted military coup was faked, comparing it to the Reichstag fire - the 1933 arson attack on the German parliament building used by Hitler as an excuse to suspend civil liberties and order mass arrests of his opponents.

Some of the soldiers detained following the coup reportedly told interrogators they were not aware they were part of a coup attempt and had been told by commanders they were taking part in military manoeuvres.

The swift rounding up of judges and others allegedly involved in the coup indicated the government had prepared a list beforehand, the EU commissioner dealing with Turkey's membership bid said.

"It looks at least as if something has been prepared. The lists are available, which indicates it was prepared and to be used at a certain stage," Johannes Hahn said.

"I'm very concerned. It is exactly what we feared."

Observers said the scale of the crackdown, especially against the judiciary, indicated the government was taking the opportunity to further consolidate Mr Erdogan's power.