Anadolu Agency says the general is being taken to a safe location.
Erdogen said the coup is now over and the government is now in control.
Parliamentary Speaker Ismail Kahraman early Saturday said that 1374 pro-coup figures have been detained across Turkey during an emergency meeting at the parliament.
US President Barack Obama has been briefed, while the Kremlin said it was "deeply concerned" by the developments.
President Barack Obama has been briefed on the developments in the key North Atlantic Treaty Organisation ally, the White House said.
Nothing in NATO's founding 1949 Washington Treaty says anything about intervening in the internal or political affairs of an alliance member, and Turkey kept its NATO membership following past military coups.
"There are certain groups who took the arms trusted to them by the state and pointed them toward state employees", Yildirim said.
A Turkish official who did not want to be named said soldiers had been deployed in other cities in Turkey, but did not specify which ones. The official spoke to The Associated Press on condition of anonymity because he wasn't authorized to speak to the media.
He said the act was encourage by the "parallel structure" - his shorthand for followers of Fethullah Gulen, a USA -based Muslim cleric who he has repeatedly accused of attempting to foment an uprising among his followers in the judiciary and the military. That includes the National Intelligence Agency, police and government buildings.
"They control several strategic points in Istanbul".
CNN-Turk is showing images of dozens of soldiers giving themselves up to government forces on Istanbul's Bosporus Bridge.
"These tanks dont belong to them".
The Turkish military claims to have "fully seized control" of the country amid reports of aerial attacks, gunfire and explosions in Istanbul and the Turkish capital Ankara. They are flying against our people. "I never believed in a power higher than the power of the people", he said.
North Atlantic Treaty Organisation called for "full respect" for Turkey's democratic institutions.
They also called for restraint and the avoidance of violence or bloodshed.
Earlier the president struck a defiant note, vowing that the "coup plotters" trying to take over the country would not succeed and calling on his supporters to take to the streets. CNN-Turk showed police taking away a soldier with his hands bound behind his back with wire.
Before this, the president of Turkey was a largely ceremonial role, but Erdogan tried to change that by altering the constitution to give him more power.
Prime minister Binali Yildirim has called all MPs to an emergency meeting on Saturday, Anadolu reported. State-run Anadolu Agency said 17 police were killed at the special forces headquarters there.
Lawmakers are now hiding in shelters inside the building, one member of parliament told news agency Reuters. And Turkish broadcaster NTV reported that a helicopter controlled by the coup leaders was shot down by a Turkish military F-16.
President Recep Tayyip Erdogan has flown into Istanbul after an army group said it took over the country. Erdogan called on the Turkish people to flood the streets in a show of support for his embattled government.
It is not yet known who was behind the coup. A US -based organization close to Gulen earlier denied involvement.
There have been no independent verification of the claims by the military or the government.
Earlier in the evening, the alliance said, "we condemn any military intervention in (the) domestic politics of Turkey".
Military jets took off from Eskisehir after the prime minister ordered destruction of aircraft above Ankara used in attempting military coup.
At the start of the demonstration, military jets could be seen flying very low over Ankara, the Turkish capital.
It was also reported that Erdogan's hotel on the Aegean coast was bombed shortly after he left. Furthermore, Turkey has maintained its membership in the group through past military coups. The former secretary of state echoed Kerry's remarks, saying, "We should all urge calm and respect for laws, institutions, and basic human rights and freedoms - and support for the democratically elected civilian government". We are in charge and we will continue exercising our powers until the end.
He also said "This country can't be managed from Pennsylvania", directly linking the coup attempt to US-based exiled imam Fethullah Gulen. "It will end well".
The coup attempt has been condemned by the country's four major parties represented in the Turkish parliament - including the three parties in opposition - according to statements on television and on the parties' Twitter feeds.
In Istanbul, an official at Haydarpasa Numune Hospital said at least 150 people were admitted with wounds but would not comment on whether there were fatalities.
Turkish TV channels are broadcasting scenes of soldiers being escorted away by policemen. NTV reported six dead had been brought to that hospital.