Turkey's President Recep Tayyip Erdogan has said the attempted coup by sections of the military will be put down.

“We will overcome this,” Mr Erdogan said, speaking by mobile phone to the Turkish sister station of CNN. He called on his followers to take to the streets to defend his government and said the coup plotters would pay a heavy price.

The army seized media outlets, including the state-run TRT channel. The channel has broadcast a statement on the orders of the military. An announcer read a statement on the orders of the military that accused the government of eroding the democratic and secular rule of law. The country would be run by a “peace council” that would ensure the safety of the population, the statement said.

The statement said: “Turkish Armed Forces have completely taken over the administration of the country to reinstate constitutional order, human rights and freedoms, the rule of law and general security that was damaged.

“All international agreements are still valid. We hope that all of our good relationships with all countries will continue.”

A source at TRT told The Independent she and her colleagues were evacuated by the military earlier on Friday.

Mr Erdogan and his supporters have blamed the Islamist Gulen movement of the US-based Islamic cleric Fethullah Gulen, once considered his allies and now his enemies, for the coup. However, the movement denied any involvement in the Turkish military coup attempt. The Alliance for Shared Values said: “we condemn any military intervention in (the) domestic politics of Turkey.”

It remains unclear just how much support the attempted coup has among the Turkish military. They were clashes between the military and police on Friday night. A Turkish military commander said fighter jets had shot down a helicopter used by the coup plotters over Ankara. State-run Anadolu news agency said 17 police were killed at special forces headquarters there.

Crowds appeared to be answering Mr Erdogan's call to take to the streets, defying orders by the coup leaders to stay indoors.

“We have a prime minister, we have a chief of command, we're not going to leave this country to degenerates,” shouted one man, as groups of government supporters climbed onto a tank near Istanbul's Ataturk airport. Crowds also gathered to greet President Erdogan as he arrived back in Istanbul early on Saturday.

Access to Internet social media sites was cut off in some areas, and troops sealed off the two bridges over the Bosphorus in Istanbul, one of which was still lit up red, white and blue in solidarity with victims of the Bastille Day truck attack in France a day earlier.

Turkey, a Nato member with the second biggest military in the Western alliance, is one of the most important allies of the United States in the fight against Isis.

It is a principal backer of opponents of Syrian President Bashar al-Assad in that country's civil war, and host to 2 million Syrian refugees.

The country has been at war with Kurdish separatists, and has suffered numerous bombing and shooting attacks this year, including an attack two weeks ago by Islamists at Istanbul's main airport that killed more than 40 people.

US Secretary of State John Kerry says he hopes for stability and continuity in Turkey following reports of the attempted coup.

Moscow has called on the country to avoid “bloodshed” and Russia's foreign minister is advising countrymen in Turkey to stay inside amid coup uncertainty.