Murat Sabuncu, editor in chief of Cumhuriyet, is greeted after his release from prison in March. He is appealing a terrorism conviction that he says was a groundless attempt to muzzle his newspaper. Photo: huseyin aldemir/Reuters

ISTANBUL—Editor in Chief Murat Sabuncu and 13 colleagues at the Turkish daily Cumhuriyet are back at work in time to cover next month’s national elections, after as much as 17 months in jail and terrorism convictions that could send some of them back to prison for years.

But emergency rule, a media crackdown and an antigovernment reputation that has scared away advertisers have left their newspaper, a rare independent voice in Turkey, operating on a shoestring.

“We’re doing the office cleaning ourselves,” said Bulent Mumay, who runs the online team.

After the arrest of staff members of Turkish daily newspaper Cumhuriyet, protesters gathered on Oct. 31, 2017 in front of an Istanbul courthouse holding copies the paper and pictures of some of the detainees. Photo: Yasin Akgul/AFP/Getty Images

Since authorities imposed emergency rule in the wake of a failed coup in 2016, the nation’s media landscape has been largely refashioned to serve President Recep Tayyip Erdogan’s ambition to secure a new mandate.

If he prevails in the ballot, Mr. Erdogan will take on vastly expanded presidential powers that voters narrowly approved in a constitutional referendum last year and that come into force after the election.

Authorities have closed dozens of media outlets on accusations that they supported coup plotters or Kurdish separatists. Almost all remaining national newspapers and television channels have been acquired by industrial tycoons loyal to Mr. Erdogan, and support government policies.

The post-coup crackdown has also targeted elements of the military, the judiciary and universities.

“Over the past two years, through successive states of emergency, the space for dissent in Turkey has shrunk considerably,” Zeid Ra’ad Al Hussein, the United Nations human-rights chief, said on May 9. “It is difficult to imagine how credible elections can be held in an environment where dissenting views and challenges to the ruling party are penalized so severely.”

The government says reporters aren’t being prosecuted for their journalistic work, but for supporting terrorist groups. The 14 Cumhuriyet staffers were convicted of supporting terrorism by a Turkish court last month but have been released on bail pending appeal. They say the charge that they supported terrorists was a groundless attempt to muzzle them.

The newspaper and other rare domestic independents such as online news websites T24 and Diken have preserved their autonomy by keeping tight control on ownership. But they say they are being financially asphyxiated because advertisers are staying away for fear of alienating the government.

Turkish President Recep Tayyip Erdogan, shown speaking in Istanbul on May 18, is looking to be re-elected next month into an office with expanded powers. Photo: tolga bozoglu/EPA/Shutterstock

Mr. Erdogan said he would recognize results of the presidential and parliamentary ballots set for June 24. “If we win again, everybody will respect that, if we lose, we will respect the winner, it is as simple as that,” he told the BBC.

Modern Turkey has a history of attacks on the press, a past that is on display in the corridors of Cumhuriyet, which was founded in the early 1920s in the same breath as the republic. Hanging on the walls are portraits of Ilhan Selcuk, a longtime editor in chief who was detained and tortured after a military coup in 1971, as well as of some of the newspaper’s six reporters and contributors who were killed in its 94-year existence.

“I’ve been detained so many times that I know most of Istanbul’s jailhouses,” said Aydin Engin, a 77-year-old columnist at Cumhuriyet, who filled in as editor in chief during Mr. Sabuncu’s 16 months in pretrial custody.

Turkish authorities have also recently targeted foreign media. Last year, a Turkish court sentenced Wall Street Journal reporter Ayla Albayrak to two years and one month in prison, declaring her guilty of engaging in terrorist propaganda through one of her Journal articles from 2015. Journal Editor in Chief Gerard Baker called it “an unfounded criminal charge and wildly inappropriate conviction.” Ms. Albayrak, who resides outside Turkey, has appealed.

Nowadays, pressure on independent Turkish media comes in a variety of forms.

At Diken, the online news site, Editor in Chief Erdal Guven keeps track of stories that have been blocked by BTK, Turkey’s telecommunications watchdog, often following complaints filed by the government. The government often says such restrictions are necessary to support their fight against terrorism or combat alleged defamation.

“It’s at least 150 since our creation in 2014,” Mr. Guven said. “We usually republish the story with a new link and it gets blocked again. Sometimes we challenge the order in court but I don’t recall [winning a case].” One of Diken’s reporters is on trial on terrorism-related charges.

Cumhuriyet journalists discussed the day’s stories at an editorial meeting in September, 2017, before 14 staffers were arrested on terrorism charges. Photo: Chris McGrath/Getty Images

Then there is the daily struggle to raise advertising revenue. “Last year, a big foreign company awarded us a three-month advertising campaign,” Mr. Guven said. “After 11 days, they called and asked us to remove the ad immediately. We found out they had received a phone call.”

Mr. Sabuncu, flipping through the pages of Cumhuriyet ahead of a recent news meeting, also pointed to the near-absence of advertisement.

“Nothing here, nothing here, nothing here,” he said.

As the editor reached to the last page, he noted a couple of legal filings related to property disputes and an open letter by university teachers. “As you might suspect, we can’t charge much for that.”

A national committee tasked with allocating government-funded advertisements to the media said its reports contained “trade secrets” and couldn’t be consulted by the press. Turkey’s association of private advertisers declined to comment.

Initially confined to newsrooms, the government crackdown on the press has spread to social networks and mainstream television.

In 2016, a schoolteacher phoned in during Turkey’s most watched live-entertainment show, “Beyaz,” which regularly took calls from viewers. The teacher, Ayse Celik, used her few minutes on air to voice concerns that heavy fights under way at the time between Turkish security forces and militants from the Kurdistan Workers’ Party, or PKK, could cause civilian deaths.

“I don’t want children to die,” she said.

Last year, a Turkish court said Ms. Celik’s on-air comments amounted to support for the PKK, and sentenced her to 15 months in prison.

To prevent further unscripted interventions during the talk show, calls from viewers are now only aired exceptionally and after thorough vetting, according to people familiar with the procedures.

A spokeswoman for Kanal D, which broadcasts the entertainment program, declined to comment. Ms. Celik, who has been released temporarily to breast-feed her newborn baby girl, denied committing any crime.

“I’ve only said words that could have been said by anyone calling himself a human being and who has a conscience,” she said.

Related

For the Cumhuriyet staff, trouble began at 6 a.m. on the last day of October 2016, when police raided the houses of several reporters and almost all the top management.

The newspaper’s chief executive, Akin Atalay, was in Germany that week. He returned to Turkey and was eventually arrested.

“They tried to tarnish my reputation, saying I had fled Turkey,” Mr. Atalay said. “I couldn’t accept that.”

He was sentenced to more than eight years in prison; Mr. Sabuncu to 7½ years. They will have to serve time if they lose in appeal.

Since returning to work, the two men said they have been focused on securing new sources of revenue. They are counting on donations from foreign institutions and on the launch of an English-language version of the newspaper, possibly in June. Inspired from the strategy of the Guardian, the U.K. newspaper, the site will invite readers to make financial contributions online.

Around noon, Mr. Sabuncu was discussing the wording of a headline for a sensitive story with a colleague when a group of about 40 schoolchildren accompanied by their teachers swarmed the management floor.

Asked about the purpose of the visit, an 8-year-old boy said: “We’re coming to learn how you make a newspaper.”

Write to David Gauthier-Villars at David.Gauthier-Villars@wsj.com

Corrections & Amplifications
Cumhuriyet Editor in Chief Murat Sabuncu and 13 colleagues spent as much as 17 months in jail. An earlier version of this article incorrectly said they spent as much as 15 months in jail. (May 26, 2018)