ANKARA, Turkey (CBSNewYork/CBS News/AP) — Bullets rained down from helicopters, crowds came face-to-face with tanks and soldiers with weapons, and TV stations were taken over as military forces tried to oust the Turkish government in an overnight coup.

Turkish officials claimed Saturday morning local time that the government had repelled the attempted military coup, but the circumstances remained unclear.

Throughout the night Friday into Saturday in Turkey, there were explosions, air battles and gunfire across the capital that reportedly left at least 42 people dead, according to state-run media.

Many Turks heeded President Recep Tayyip Erdoğan’s call to take to the streets to show support for his embattled government.

Early Saturday Turkish time, Erdoğan said arrests were under way in a coup attempt that he said amounted to “treason.”

Prime Minister Binali Yildirim said more than 130 were arrested, and claimed that “things are getting better every minute.”

Some Turkish residents were even detaining soldiers in their own homes.

Turkey’s state-run news agency later said a military helicopter used by coup plotters was shot down early Saturday, while CNN-Turk showed images of dozens of soldiers giving themselves up to government forces on Istanbul’s Bosporus Bridge.

CNN-Turk quoted Yildirim as saying that commander of Turkey’s 1st Army, Gen. Umit Dundar, was appointed acting chief of military staff.

Earlier, President Erdoğan said he had no information concerning Chief of Staff Gen. Hulusi Akar, who was reportedly taken hostage at the military headquarters by coup plotters.

An official at Haydarpasa Numune Hospital in the Uskudar district of Istanbul earlier told The Associated Press they had admitted at least 150 wounded earlier Saturday. The official refused to comment om whether there were fatalities.

More From CBS News

According to transcripts of the president’s remarks provided by his office, Erdoğan said that he arrived in Istanbul from the holiday resort of Marmaris, which was also been bombed after he left there.

He said: “Those who drive around in tanks will have to go back to where they came from…. The most important thing right now is that millions of Turkish citizens are on the streets at 4.30 a.m.”

Earlier, an announcer on TRT television said members of the military had entered their station and demanded the network broadcast additional information, including that a curfew was in place and that martial law had been imposed.

The announcement said a “peace council” had been established to maintain order and that a new constitution would be prepared as soon as possible. TRT was later taken off the air.

The state-run Anadolu Agency reported a bomb hit the Turkish parliament in Ankara. CNN-Turk television reported some police officers and parliament workers were hurt in the bomb attack.

Two large explosions were heard near Taksim square in Istanbul, where police and military were exchanging fire. The blasts were accompanied by the screech of fighter jets.

Erdoğan, in an interview over FaceTime with the CNN Turk station, dismissed the military action as “an attempt at an uprising by a minority within our armed forces.”

Large crowds reportedly greeted Erdoğan as he emerged from a vehicle at Istanbul’s Ataturk Airport early Saturday morning. His whereabouts had been undisclosed Friday evening into early Saturday.

Meanwhile, flights in and out of Turkey were suspended, and none were seen at John F. Kennedy International Airport, CBS2’s Christine Sloan reported.

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

CBS News foreign correspondent Holly Williams reported from Istanbul that Erdoğan has spent time trying to decrease the influence of the military, in effect attempting to “defang” the armed forces.

The coup attempt began late Friday Turkish time, with a statement from the military saying it had seized control “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,” CBS2’s Brook Silva-Braga reported.

The state-run Anadolu Agency, citing unnamed military sources, says the leader of the attempted coup was Col. Muharrem Kose. The agency says Kose, who headed the military’s legal advisory department, was dismissed from the position a short time ago.

PHOTOS: Turkish Military Occupy Strategic Locations In Attempted Coup

Many believed the military-led coup was orchestrated by Fethullah Gulen, a Turk living in self-exile in the U.S., in the Poconos. But early Saturday, Gulen released a statement denouncing the coup and reports linking him to it.

“I condemn, in the strongest terms, the attempted military coup in Turkey. Government should be won through a process of free and fair elections, not force,” Gulen said in the statement. “I pray to God for Turkey, for Turkish citizens, and for all those currently in Turkey that this situation is resolved peacefully and quickly.

“As someone who suffered under multiple military coups during the past five decades, it is especially insulting to be accused of having any link to such an attempt. I categorically deny such accusations,” Gulen continued.

The commander of the military special forces condemned the coup earlier in the night.

“Those who are attempting a coup will not succeed. Our people should know that we will overcome this,” Gen. Zekai Aksakalli told the private NTV television by telephone. But the military did not appear unified, with top commanders taking to television to condemn the action and order troops back to their barracks.

Fighter jets under the control of loyalist forces flew over the capital to strike at helicopters flown by coup supporters during the coup attempt, the state-run Anadolu news agency said. Private NTV television reported that one helicopter was shot down.

During the fighting, 17 police officers were killed in a helicopter attack on police special forces headquarters on the outskirts of Ankara, Anadolu said.

President Barack Obama is urging all parties in Turkey to support the democratically-elected government of Erdoğan. He’s urging them to show restraint and avoid any violence or bloodshed amid a military takeover of the key NATO ally.

The White House says Obama and Secretary of State John Kerry consulted by phone Friday night after the stunning turn of events. Kerry, who was traveling in Moscow, underscored that the State Department will focus on keeping U.S. citizens in Turkey safe and secure.

“I hope there will be stability and peace and continuity within Turkey, but I have nothing to add with respect to what has transpired at this moment,” Kerry said.

The military statement promised to observe international agreements.

Turkish New Yorkers React To Attempted Coup

The coup sent shockwaves through the Turkish community in New York. In Park Slope, Brooklyn, Isa Kachan kept an eye on what is happening on his iPhone, as most of his family lives in Turkey.

“I just had a chance to reach my brother,” Kachan said. “He said they locked all the windows and doors and they’re behind the doors with the kids.”

Meanwhile, Gulen’s supporters said he preaches a more tolerant Islam while Erdoğan has been forcing his own Islamic ideas on the country.

“I vote for him, but he is a hundred percent wrong telling his people to go out and fight for him,” Kachan said. “He’s not saying for yourself or your country. He’s doing it for himself.”

And while Obama and Kerry said Turks should support Erdoğan, many secular Turks believe Erdoğan, with fierce supporters of his own, has been chipping away at democratic rights.

“The people have to choose the president or the regime or how they want to live in their country,” said Lala Sarkhanova of Park Slope.

One Turkish New Yorker told 1010 WINS’ Carol D’Auria that his fellow countrymen back home are strong and peaceful people. He wants to believe they’ll be able to overcome the coup.

“They’ve tasted the democracy and they’ve tasted it since we first became a republic and they’re not going to let it go,” he said.

At the Turkish Grill on Queens Boulevard, Jasmine, the co-owner, said she has been in contact with her family. She believes this will pass.

“We are a very strong country, we have young people, educated people. So, you know we are better than we used to be,” she said.

She said after the last coup there was no food.

(TM and © Copyright 2016 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2016 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press contributed to this report.)