Turkey's military aounced on Friday night that the army had taken over “the entire management of the country to restore rule of law” as the country's prime minister admitted an “attempt” by a group within the military while falling short of calling the attempt a military coup.

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."

"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."

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.

Earlier, the Dogan news agency published a statement from the military saying the coup was carried out "to reinstall the constitutional order, democracy, human rights and freedoms, to ensure that the rule of law once again reigns in the country, for the law and order to be reinstated."

The military statement went on to say that "all inteational agreements and commitments will remain. We pledge that good relations with all world countries will continue."

Reuters, citing a witness, reported that gunshots were heard in Ankara shortly before 11 p.m. local time Friday. 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.”

There were no immediate reports of any casualties, though local media reported that ambulances wre seen in front of Turkish military headquarters.

Soldiers blocked entry to Ataturk Airport where four tanks were stationed, according to the private Dogan news agency. Two other tanks and a military vehicle were stationed in front of the VIP terminal. The report said the soldiers had entered the tower and stopped all flights.

Dogan reported that one-way traffic on the Bosporus and Fatih Sultan Mehmet bridges in Istanbul were blocked. Video footage showed the bridge being blocked by military vehicles.

In Washington, the National Security Council said President Barack Obama had been briefed on developments in Turkey and would continue to get regular updates on the "unfolding situation."

U.S. Secretary of State John Kerry, in Moscow for talks with Russian officials on Syria on Friday, told reporters he didn't have details of the situation rapidly unfolding on the ground in Turkey and said it would be "inappropriate" to comment on developments.

Kerry did express hope that the key ally and strategically important member of the coalition fighting ISIS would remain at peace.

The Associated Press contributed to this report.