ISTANBUL — Imagine if back in the days of Watergate, Bob Woodward and Carl Bernstein had been put on trial for being part of the very conspiracy they were trying to uncover. Then suppose a large section of the Washington press corps proceeded to pat federal prosecutors on the back for a job well done.

Such is the life of a journalist in today’s Turkey — a world in which the justice system punishes the innocent while the Fourth Estate turns a blind eye. Turkey now holds the dubious record for being the country with the most imprisoned journalists — 57 according to a report by the Organization for Security and Cooperation in Europe. There are as many as 1,000 other cases pending against journalists, many of whose only crime was rigorous reporting.

Yet Turkey is also Europe’s fastest growing economy, a candidate country for membership in the European Union, and a nation publicly committed to rooting out the antidemocratic and militaristic forces that have marred its recent past. Turkey should be a beacon to its fellow Muslim-majority nations in North Africa and the Middle East trying throw off the yoke of authoritarianism. But it cannot set an example so long as its own government refuses to tolerate criticism and a cowed media looks the other way.

Turkey has countless capable reporters and photographers eager to do their jobs. For years, these journalists treated the occasional encounter with the country’s antediluvian penal code as a professional rite of passage. I myself stood in the dock more than 10 years ago, charged with “insulting the army” in my column for a Turkish-language paper. I was eventually fired after the chiefs of staff — upset about my reporting on the Kurdish issue, pressured my editors to give me the boot.

But state repression is not the only problem; the jelly-like backbone of Turkey’s Fourth Estate is also to blame. Sadly, the most effective censor in Turkey today is the press itself. To adopt a stance critical of current policies is to position oneself in opposition to the government — and editors only do so as a calculated risk. Columns exposing corruption or criticizing the government’s sprawl-inducing environmental policies are simply spiked.

When Turkish newspapers try to speak their mind, they often discover their advertisers dropping out, explaining apologetically that they have “come under pressure.”

Some of the journalists currently behind bars have been charged in connection with a long-running conspiracy trial intended to dismantle what state prosecutors describe as a well-organized network — codenamed Ergenekon — that intended to provoke a military coup. Others are charged with defying onerous reporting restrictions on court proceedings, including the Ergenekon trial itself.

Most of the Ergenekon suspects are serving or retired military officers charged with plotting or carrying out violent acts in order to turn public opinion against the governing AK Party, which has its roots in an Islamic movement.

But recently, prosecutors ordered the detention of two respected journalists, Nedim Sener and Ahmet Sik, who were once supporters of the Ergenekon trial.

Sener’s reporting revealed that the police had stopped short of finding those really responsible for the murder in 2007 of the Turkish-Armenian newspaper editor Hrant Dink because the trail might have led back to the police themselves. Sik’s unpublished manuscript, which the police tried and failed to ban before it began freely circulating on the Internet, pointed a finger at a prominent religious group known as the Gülen movement. Sik’s book alleged that the group’s members, who have close ties with the AK Party, had penetrated the police force.

Last month, in my regular column for an English-language edition of the daily Zaman — which is affiliated with the Gülen movement — I argued that the government’s fight against antidemocratic forces was taking a decidedly undemocratic turn.

Though I am not a member of the Gulen movement, I believed that Zaman, like the Christian Science Monitor in the United States, could provide a platform for differing points of view. So I argued the obvious, that as a newspaper we had an obligation to defend Sik’s freedom of expression in order to protect our own integrity. The article cost me my job.

My former editor published a column justifying my dismissal, claiming that I had fallen prey to “strong and dark propaganda.” I am not the only one: Cuneyt Ulsever of Zaman’s rival Hurriyet had his column axed after being unofficially censored for months by a colleague who demanded that he revise passages the government might not like.

So this week, as we mark World Press Freedom Day, let us hope that those journalists languishing in Turkish prisons will be freed until the courts prove them guilty — and that their colleagues on the outside throw off their shackles to engage in proper journalism.

Andrew Finkel is a journalist who has been based in Istanbul since 1989, and author of the forthcoming “Turkey: What Everyone Needs to Know.” New York Times