ISTANBUL _ Explosions and gunfire echoed in the Turkish capital and military helicopters buzzed overhead early Saturday, as the armed forces claimed to have seized "full control" of the country and President Recep Tayyip Erdogan called on supporters to take to the streets to defend his rule.
The chaotic events in a country that is a NATO ally, regarded as pivotal in the fight against the jihadists of Islamic State, boded ill for a region already roiled by violence.
Tanks and soldiers blocked the entry to Istanbul's main international airport, the private Dogan news agency reported, and vehicles halted traffic over two major bridges in Istanbul, the country's commercial capital, where gunfire and injuries were reported.
In a statement, the powerful military declared that it had seized control to "ensure that the rule of law once again reigns in the country." The military has been a traditional bastion of secularism, while Erdogan has taken an increasingly Islamist tilt in the course of his rule.
Prime Minister Binali Yildirim denied that the military had succeeded in wresting control from the government.
Speaking to Turkey's private NTV television, Yildirim characterized events as a coup "attempt" by "certain groups who took arms entrusted to them by the state and pointed them toward the state," the Associated Press reported.
In Ankara, hundreds of government supporters walked along a main boulevard toward the prime minister's office, waving Turkish flags and chanting "God is great!" One marcher called the situation a "mini-war."
The turmoil was reminiscent of coups that rattled Turkey from the 1960s to the 1990s, but Erdogan's ruling Justice and Development party had managed to instill a sense of stability in recent years. Human rights groups and Western governments, though, have expressed deepening concern about a continuing erosion of rights and moves by Erdogan to muzzle dissent, stifle the media and bolster his personal power.
Erdogan has also launched a punishing war on Kurdish separatists, declaring them to be a far more dangerous threat than the jihadists of the Islamic State.
It was several hours before the president was able to take to the airwaves to denounce the attempt by what he called a "minority" of the Turkish military to take power. For a man who until now controlled most of the country's news media, he was reduced to communicating with CNN Turk, a television channel he considers to be an opponent, over FaceTime.
"They will pay the price, the highest cost at the end," Erdogan said.
The Turkish president, who had been on vacation on the Aegean coast, said he would return to Ankara shortly. But that may be difficult to accomplish.
In Beyoglu, Istanbul's business district, the main streets were quiet, and there was no sign of military or police personnel, even at a principal administrative headquarters of the state television.
Erdogan blamed the uprising on Fetullah Gulen, a retired Islamic cleric and former political ally, who once had a sizable following in the Turkish police, judiciary and military.
The president has purged the police and judiciary of reputed Gulen sympathizers over the past two years, and had been due to hold a meeting of the body overseeing the military, the High Military Council. There were reports he was planning to oust anyone still linked with Gulen.
Gulen now lives in exile in Pennsylvania, and Erdogan has tried, thus far unsuccessfully, to obtain his extradition to face allegations of supporting terrorism.