Israel's media operates under official censorship. That has been the basic fact of my professional life as a journalist covering foreign policy and national security. Here's how it works: any story involving defence, intelligence, or nuclear matters must be submitted to the military censor's office. It can run only after being stamped for approval.

Israel being Israel, and not China or the former German Democratic Republic, its censorship is less scary than it might appear. The 35 military censors are not faceless, inaccessible bureaucrats who work behind walls. You know them personally and you can negotiate the wording to let the story pass.

Paradoxically, the existence of censorship has its advantages. Your military and intelligence sources are more open to give you secret information, trusting the censor to play bad cop. More importantly, once you have submitted anything to the censor, you're relieved from legal responsibility.

The main goal of censorship is deterrence: you know that your story will be blacked out, so why bother writing it. All of us are well-trained in self-censorship and in using code words like "nuclear capability" or "nuclear option" rather than "nuclear weapons".

The success of censorship relies not on coercion and legal enforcement, but on public support. The military and intelligence community enjoy sacred status in Israeli society, and "national security" resonates much better than "civil liberties". Many journalists accept censorship willingly as their national contribution, don't argue with it, and criticise their peers who break with the official line. They are even proud of knowing the story and withholding it from their audience.

As a young journalist in the late 1980s, I wasn't a member of the club and prepared a critical story about the Mossad. "Do it in your free time, it'll never see the light of day anyway," my editor warned me. It was duly censored. My new editor, Meir Schnitzer, appealed to the high court. We won the landmark case, which set the scope of censorship.

Since then, the tide of censorship has turned in tandem with the public sentiment toward security. The second Lebanon war of 2006 caused a major setback, as the media was blamed for disclosing the locations of rocket attacks and thus "supplying Hezbollah with targeting data". The Olmert government, and the Netanyahu government that succeeded it in 2009, leveraged the public anger to impose stricter censorship.

In most cases, the media lives with restrictions through quoting "foreign sources". At Haaretz, we can't write that Israel bombed a nuclear reactor or arms convoy in Syria, but if it's published in the Guardian, for example, it's fine.

This week, however, we were told not to even quote foreign sources, when ABC news broke the story of Ben Zygier, an Australian-born Mossad agent who had strayed from his mission, was locked secretly in solitary confinement, and committed suicide in prison in late 2010. The affair was covered by a gag order, which is stronger than ordinary censorship: disobeying it risks criminal prosecution. We ran a story quoting the Australian broadcast, and were told to take it off our website. Then the editors of Israel's newspapers, TV and radio news channels were summoned to a closed-door briefing by Mossad head Tamir Pardo, who asked them to ignore the story.

I refused to attend. I don't want to know more than my readers. If Pardo wants to explain, he should talk to the public, not to turn editors into intelligence "assets". In the meantime, the Facebook and Twitter feeds of thousands of Israelis were filled with links to the ABC news story and overflowing with comments. And three courageous opposition MKs asked the justice minister, on live broadcast, about the mistreatment of a mysterious prisoner. Several hours later, the gag order collapsed, and the government issued an official statement the next day, acknowledging "negligence" in the treatment of Prisoner X.

The government realised its hopeless effort to seal the Zygier story, and backed down. An overdue debate over the mishaps of Mossad and the prison service in the case ensued. Luckily for us, our Australian colleagues helped in strengthening Israeli democracy. But unfortunately, this will not change the basic facts of life for us. As long as "state security" is sacred in the public mind, we will have censorship.