Turkey’s president told the nation Saturday that he is in charge and a coup attempted by elements of the military would fail. Dozens were reportedly killed in gunfire and clashes overnight.

President Tayyip Erdogan blamed a" "minority within the military" in a televised address to the country after landing at Istanbul's Ataturk Airport at around 4 a.m. Saturday local time (9 p.m. Friday ET).

"They are going to pay for this in the harshest way," Erdogan vowed.

Erdogan said he was on vacation in Marmaris when the attempted coup unfolded, and after he left F-16 fighter jets bombed the area where he stayed. He said his general secretary was abducted by those carrying out the coup and there is no information on the chief of the military staff.

It wasn't clear that the coup was over. Turkish Prime Minister Binali Yildirim said early Saturday that the situation was largely under control, but later said rebel fighters in Ankara and Istanbul were still firing from the air. A large blast was earlier heard inside the parliament building in capital of Ankara and Turkish TV showed damage to the top of the building.

The Turkish Embassy in Washington, D.C., said in a statement late Friday ET that "Our president and government are in charge."

The country’s chief public prosecutor said on Turkish TV that 42 people were killed in the capital of Ankara, and 60 were killed across the nation. The prime minister said 130 soldiers were taken into custody and one general was killed.

The turmoil erupted Friday night after troops and military vehicles shut down Istanbul's Bosphorus Bridge and Fatih Sultan Mehmet Bridge, the two conduits connecting the nation's European and Asian sides, and jets were heard flying low over Ankara.

Erdogan contacted news channel CNN Turk by Facetime and told people to take to the streets in a show of support for the government.

Thousands apparently did. People were seen swarming tanks in the street and marching on soldiers blocking bridges, and thousands of supporters were seen at Ataturk Airport, which was closed.

Erdogan said Saturday "many people have been arrested. Some commanders, some high level military people are being arrested now and it will not stop here."

At around 7:40 a.m. local time (12:43 a.m. ET), Turkish Airlines said Ataturk Airport was opened and the airline's flights would resume as normal.

State-run media Anadolu Agency reported that around 50 soldiers surrendered on the Bosphorus Bridge Saturday morning. Video showed the soldiers abandoning their tanks and surrendering with their hands up.

Overnight, private Turkish news agency Dogan reported that soldiers opened fired on people trying to cross the Bosporus bridge in protest of the attempted coup, and some were wounded. Other reports said Turkish fighter jets had shot down a military helicopter amid clashes overnight.

Friday, U.S. President Barack Obama called Secretary of State John Kerry and they "agreed that all parties in Turkey should support the democratically-elected government" and avoid bloodshed, The White House said in a statement.

Turkey's state-run Anadolu Agency reported that 17 police officers had been killed in a helicopter attack on police special forces headquarters on the outskirts of Ankara. The state-run news agency also said bomb was thrown at the the National Assembly building in the capital, injuring 12 police officers.

The government-run TRT channel was taken over, and a woman read a statement announcing the military seized it shortly before the channel was taken off air. Later, TRT began broadcasting again, and large crowds were seen inside a television station in apparent opposition to the coup attempt.

In his address Saturday, Erdogan appeared to blame followers a Muslim cleric who is living in self-imposed exile in Pennsylvania, Fethullah Gulen. "They were being told what to do from Pennsylvania," Erdogan said.

A non-profit group inspired by Gulen's teachings condemned the attempted coup.

Erdogan suggested the government would remove elements in the military sympathetic to those that attempted the coup. "This uprising is a gift from God ... because this will help us claim our military from these members of this gang."

There were reports that social media was slowed or obstructed during the coup attempt. Twitter said "We have no reason to think we’ve been fully blocked in Turkey, but we suspect there is an intentional slowing of our traffic in [the] country."

Turkish tanks move into position as Turkish people attempt to stop them in Ankara.Burhan Ozbilici / AP

Erdogan was elected president in 2014 in the country's first direct presidential election, after serving as prime minister for three terms. He has been criticized in recent years over crackdowns on media freedoms, following a corruption investigation that was shut down as an attempt to overthrow him.

US citizens in #Turkey should shelter in place & stay indoors. Update family/friends of your status when possible.

Turkey is one of America's key NATO allies. Its strategic location, bordering Syria, Iraq and Iran, makes it a gateway for those wishing to travel to Syria or Iraq and join the terror group ISIS. In August, it began allowing U.S. jets to conduct strikes against ISIS in Syria, flying from a joint military base in Incirlik.

NATO Secretary General Jens Stoltenberg said on Twitter that he had spoken to Turkey’s foreign minister. "I call for calm, restraint & full respect for Turkey’s democratic institutions," Stoltenberg said.

The joint U.S.-Turkish Military Base at Incirlik, located in Adana, and other outlying went to "Force Protection Condition Delta" after the coup unfolded. According to U.S. military documents, the security condition dictates all missions halt except base security.