Members of Turkey's military aounced on Friday night that they had seized power in the country, with reports that a bomb hit the parliament building in Ankara as a spokesman for Turkey's national intelligence agency claimed the takeover attempt had been "repelled."

CNN Turk reported that some police officers and parliament workers were hurt in the bomb attack. A nearby resident told the Associated Press he heard a massive explosion that shook buildings and saw a column of smoke. The person, who spoke on condition of anonymity for security reasons, also said fighter jets were flying low in the area.

The state-run Anadolou Agency reported that 17 police officers had been killed in a helicopter attack on police special forces headquarters in the capital. A Turkish govement spokesman also confirmed that an F-16 fighter had shot down a helicopter that had been commandeered by soldiers supporting the coup.

The country's state-run television broadcaster, TRT, was knocked off the air for several hours early Saturday after a reported explosion near their building. Anadolou reported that military helicopters also attacked the headquarters of TURKSAT satellite station on the outskirts of Ankara.

Earlier, Reuters reported that tanks surrounding the parliament building in Ankara had opened fire. The Turkish news agency Dogan reported that soldiers had opened fire on people who were crossing Istanbul's Bosporus Bridge to protest the coup attempt and some people had been wounded.

Dozen of tanks were seen moving toward a palace that is now used by the prime minister and deputy prime ministers. A civilian car tried to stop one of the tanks, but it rammed through the vehicle as those in the car escaped.

Turkish President Recep Tayyip Erdogan, speaking by cell phone to CNN Turk from an unknown location, vowed that Turkey would "overcome this invasion" and called on Turks to "gather in squares and see what this minority can do with their tanks and artillery against the people."

Ordinary Turkish citizens appeared to heed Erdogan's call, as TV footage showed marching through the streets of Izmir and Istanbul waving Turkish flags. Crowds also gathered in Ankara's main square.

"Throughout history those who make coups have been unsuccessful, and I absolutely believe that these will be unsuccessful as well," Erdogan said, adding that the architects of the takeover attempt "will absolutely pay the price for this in heaviest maer."

In Washington, a statement from the White House said President Barack Obama and Secretary of State John Kerry agreed that both sides "should support the democratically elected govement of Turkey, show restraint and avoid any violence or bloodshed."

A senior Defense Department official told Fox News that the unrest was not affecting anti-ISIS missions flown out of Incirlik Air Base in southeaste Turkey.

NATO Secretary General Jens Stoltenberg issued a statement calling for "calm and restraint, and full respect for Turkey's democratic institutions and its constitution."

A military statement read on Turkish state TV aounced that martial law had been imposed across the country and a curfew had been declared. The statement added that Turkey was now being run by a "peace council" and that a new constitution would be drawn up soon.

However, at least one senior military leader refused to back the coup attempt.

"Those who are attempting a coup will not succeed. Our people should know that we will overcome this," Gen. Zekai Aksakalli, the commander of the military special forces, told the private NTV television by telephone.

The coup began shortly before 11 p.m. local time Friday, when gunshots were first reported in Ankara. As military helicopters flew over the entertainment hub of Beyoglu district in Istanbul, televisions aired footage of military tanks and TV stations reported Turkish state TV TRT had been taken over by military officials.

Prime Minister Binali Yıldırım admitted to Haberturk TV that an “attempt” had been made against the govement and waed “those who carry out this attempt will be subjected to heaviest punishment.”

Turkey’s Justice Minister Bekir Bozdag also spoke on national TV, calling on “everyone to raise their voices against this attempt by the military and to embrace democracy.”

Ambulances were seen in front of Turkish military headquarters amid early reports that hostages were being held there.

Early Saturday, Reuters reported that witnesses had heard gunfire at Istanbul's Ataturk Airport, where four tanks had been stationed. Two other tanks and a military vehicle were stationed in front of the VIP terminal. The Dogan news agency reported that soldiers had earlier entered the control tower and stopped all flights.

Soldiers and military vehicles also blocked one-way traffic on the Bosporus and Fatih Sultan Mehmet bridges in Istanbul, which link the continents of Europe and Asia.

The chaos capped a period of political turmoil in Turkey blamed on Erdogan's increasingly authoritarian rule, which has included a govement shake up, a crackdown on dissidents and opposition media and renewed conflict in the mainly Kurdish areas of the southeast.

Fox News' Lucas Tomlinson and The Associated Press contributed to this report.