Turkish President Recep Tayyip Erdogan speaks on CNN Turk via a FaceTime call during an attempted coup on July 15. Prior to the coup attempt, Erdogan had been critical of CNN Turk and other independent media. (Burak Kara/Getty Images)

At the Dogan Media Center, a sleek glass building here that houses some of Turkey’s major media outlets, the failed coup arrived just before dawn Saturday with the low drone of a Black Hawk helicopter setting down in a nearby parking lot.

Minutes later, 14 soldiers led by a small cadre of officers entered the building and quickly split into two smaller groups to take over various news channels and publications, including the Hurriyet Daily News and the television stations CNN Turk and Kanal D.

The soldiers had one demand: Stop publishing or broadcasting. Other than that, they said little. The cameras kept rolling, how­ever, as newsroom staff members pulled out their smartphones and the producers put up a ticker that read, “Soldiers have entered CNN Turk studios.”

If the coup plotters’ intention was to silence a handful of critical media in one fell swoop, they failed spectacularly. Dispatching only a handful of men to seize four newsrooms was inadequate, and it led the outlets to resist — albeit while forcing them into the awkward position of defending Turkish President Recep Tayyip Erdogan, who has repeatedly attacked them and their colleagues around the country.

Yet despite a moment of seemingly mutual understanding between Erdogan and the independent Turkish media — best captured in a surreal moment when an Ankara bureau chief for CNN Turk let Erdogan FaceTime his nation in the throes of the coup d’etat — some Turkish journalists are wary about what the unrest will entail for their profession and ultimately their country.

Members of Turkey's military have overrun the offices of several major media organizations, including CNN Turk, which went off air. Turkey’s military launched a coup against the elected government of President Recep Tayyip Erdogan setting off a violent struggle between the nation’s military and civilian leaders. (CNN Turk)

Murat Yetkin, editor in chief of the Hurriyet Daily News, was at his desk when seven soldiers burst into the building’s atrium Saturday morning, pointed rifles at journalists and told them to “stop their work and get out.”

Outside the media center, Yetkin couldn’t help noticing that a growing crowd of anti-coup protesters contained many of the same faces from an incident in September when armed throngs who backed Erdogan had attacked his newsroom with molotov cocktails because of its reporting on Erdogan and his government.

“There’s no reason to be optimistic about this situation,” Yetkin said. “But you cannot correct bad with worse. We have a lot of problems, but that’s no reason to be supportive of a military coup.”

CNN Turk, part of the Dogan Media group that owns the Hurriyet Daily News, also had a history of conflict with the Erdogan government. But journalists said that feud was put aside when soldiers stormed the building.

“I think we did the right thing; we gave a platform to the legitimate government of this country to address the people,” said Ferhat Boratav, editor in chief of CNN Turk.

He said that allowing Erdogan to call for people to come out and demonstrate was a “risky thing” but that it was a decisive factor in ending the coup.

The Dogan Media group is part of a conglomerate known as Dogan Holding, which has had several disputes with Erdogan’s government.

In 2009, the conglomerate was fined $2.5 billion for unpaid taxes. Critics said the judgment was payback for the group’s coverage of corruption allegations against members of the president’s inner circle.

In May 2015, Erdogan accused the owner, Aydin Dogan, of being a “coup lover” and labeled the group’s columnists “charlatans.”

Dogan came to Erdogan’s defense Sunday, criticizing the coup attempt in a statement published by the Hurriyet Daily News under the headline, “Let’s defend democracy together.”

Dogan said the country had “survived a possible disaster with the solidarity of the state, the nation, politics and the media.”

He went on to say that people in Turkey, whatever their political differences, should defend democracy and come together as a nation.

Erdem Gul, Ankara bureau chief of the newspaper Cumhuriyet, said that Erdogan is unlikely to thank his former critics for their support during the coup, and that its suppression probably will mean further restrictions on press freedom.

“The government controls a big part of the media, and for those parts which it couldn’t control, they are under the threat of imprisonment or being investigated,” Gul said in a phone interview.

“For these reasons, there is a lot of concern that Turkey is now heading toward even more authoritarianism,” he said.

In May, Gul was sentenced to five years in prison for a report on Turkey’s attempt to ship arms to Islamist rebels fighting the Syrian government. A colleague, Can Dundar, received a similar sentence. Both journalists were acquitted of espionage charges, and their cases are being appealed.

But more than 30 other journalists are in prison, Gul said, and the Committee to Protect Journalists has said Turkey is one of the “worst jailers of journalists worldwide.”

“In the aftermath of the attempted coup, we urge the Turkish government to allow journalists to report on news events freely and independently,” Nina Ognianova, program coordinator for CPJ Europe and Central Asia, said in a statement. “And to do its utmost to guarantee the safety and security of all journalists.”