In April, the Guardian carried a story headlined "How Wilson hounded the colonel". In 1967 the then prime minister, Harold Wilson, was warned that Colonel "Sammy" Lohan, the secretary of Whitehall's D-Notice Committee, was plotting to bring down the Labour government. Supposedly responsible for restraining the press from publishing security-sensitive material, Lohan had in fact failed to use the D-Notice system to stop Daily Express journalist Chapman Pincher from running a sensitive story.

The disclosures about Lohan's bizarre activities, which included spying on Fleet Street journalists on behalf of MI5, occur at an awkward time for the D-Notice Committee. Most people in modern Britain thought it had vanished without trace but far from being lost in the archives of state anachronisms, the D-Notice Committee is very much alive - and embroiled in fresh controversy. The colonel's current-day successor, Rear-Admiral David Pulvertaft, is the author of further friction.

Under the regimes of both the colonel and the admiral, questionable treatment of two journalists of unusual assiduity is involved; both of them highly experienced in writing about defence matters. In the earlier case Chapman Pincher, the veteran defence and special correspondent of the old Daily Express, was, to an unusual degree (according to the newly released files), greatly favoured by the D-Notice Secretary. In the most recent case, Tony Geraghty, author and former Sunday Times defence correspondent, has fallen foul of the D-Notice secretary, with disturbing results.

Geraghty's clash was prompted by his latest book, The Irish War, a well-observed account of a largely visible British war machine coping with the horrors of the Northern Ireland Troubles, followed by intimate, and astonishing, disclosures of the covert war in the same theatre.

Having produced military histories of, among others, the SAS and the French Foreign Legion, Geraghty has produced something both readable and disturbing. We learn that "Box Five Hundred" is the Post Office box number for MI5. We learn also that "Box" - to give it its more usual, shorter name - had a habit of enticing suspects away from home with lavish dodgy holidays in the sun by faking breakfast food competitions. "While the target was away, the security service would plant a host of listening devices," and possibly miniaturised video cameras inside a domestic light switches.

A million people in the province - two-thirds of the population - are under sophisticated surveillance, according to Geraghty. He quotes a military source: "While current military surveillance is protected within current law . . . particular care must be taken to ensure that the proposed legislation which will eventually replace EPA [Emergency Powers Act] and PTA [Prevention of Terrorism Act] should safeguard military surveillance rights."

Now, enter Admiral Pulvertaft and others. In a conversation with Geraghty (a former colleague of mine) shortly after his arrest last December, he told me that Pulvertaft had suggested he submit the manuscript for vetting. On previous occasions when approached by the D-Notice people about his books on military and security matters, Geraghty had declined such requests. His reason was partly to do with bad experiences of other writers who had subjected their work to the committee and partly because he was loath to do anything that might identify and jeopardise his sources. On this occasion, too, he declined. The book went on sale to the public in the normal way. No attempt was made to impound it or to take action against its publisher. At the time of writing it is freely available in bookshops. The author, however, was not so lucky. Before dawn one morning, the Ministry of Defence police agency sent five officers to Geraghty's Hereford home where they arrested him, impounded his computer files, notebooks, lists of contacts, and other items, including material for a new book. They took him to a police station, where they held and questioned him for several hours.

Following this, Geraghty felt he was being left to "twist in the wind" until the authorities made up their minds, which they did finally in May, charging him and a military officer with offences against national security.

The arbiter of what should be classed as secret in The Irish War is the D-Notice Committee. This oddly fuzzy entity is run from Room 2235 of the Ministry of Defence's main building in Whitehall. Pulvertaft denies having anything to do with Geraghty's arrest. Any investigation of a suspected breach of the Official Secrets Act is the MoD's responsibility and Pulvertaft claims to have no say in it. "The fact that I have an office in the Ministry of Defence is simply a convenience for security reasons", he told Geraghty at one stage.

Geraghty is not convinced either by this or by Pulvertaft's subsequent published assertions that his pre-publication approach to HarperCollins had no connection with Geraghty's arrest after publication.

In a letter to London's Evening Standard on March 13, after the Geraghty case had received an airing, Pulvertaft said: "I approached Harper-Collins after reading that the book would be 'emphasising the latterday role of the special forces'. I was fearful that it might contain material which would be damaging or would put lives at risk. As the D-Notice system is a voluntary one, and as Harper-Collins assured me that the book would not in any way damage national security, I accepted its decision not to submit it. My involvement ended there. Had the [manuscript] proof been submitted and had the police taken action as a result, I could understand Mr Geraghty's allegations. In the circumstances, the connection which he makes is totally wrong, as is the accusation that the D-Notices have become coercive or that they have been abused."

Veteran journalists may be vaguely familiar with the committee's functions, implicit in its full title, the Defence, Press and Broadcasting Advisory Committee: that is, to warn off editors about to publish things actually, or potentially, regarded as security-sensitive. During the cold war, very few editors even fleetingly considered resisting such a warning. The cold war over, those of us who dimly recall D-Notices assumed the system had retired into the woodwork where it had originated. Most younger journalists have never heard of the committee or its functions.

Newspaper editors I have consulted on the subject (not members of the D-Notice Committee) betray some impatience with the D-Notice system, declaring it to be distinctly anachronistic at a time when we should be concentrating on freedom of information, not censoring it. Yet, despite editors' ambivalence about the system, most agree that some kind of advisory pipeline is required, which would reduce the risk of crucial state security details reaching a potential enemy via a newspaper's pages. With the internet capable of circumventing most national impediments, it is difficult to see how this can be achieved satisfactorily. But, says a media executive: "Someone at least should be taking a close look at radical overhaul."

Two US philosophers, Nicholas Fotion and Gerard Elfstrom, in their book Military Ethics: Guidelines for Peace and War, say there is nothing wrong with publishing information not widely disseminated but available in military publications. But delicate issues arise "when the media releases censored information that has been obtained from some inside source. It is true that encouraging this practice would encourage subversion of a certain type."

Presumably, Geraghty's sources - or some of them - could fall within the above category. He has good friends in the SAS. During the Gulf war he interrupted his book-writing to liaise between the military and the media. But his argument is that his book examined controversial, not "delicate" issues; otherwise it would have been muzzled by the authorities. So, he feels, action was taken against him personally because he refused to cooperate in the D-Notice system - despite the fact that it is officially a voluntary procedure.

Geraghty's arrest occurred in peacetime. The cold war is over. Should restrictions be relaxed in such periods? "Should writers trust the Whitehall censor to do the decent thing in peacetime, when national survival is less at risk?" asks Geraghty. "Certainly that is what England expects of its scribes. Even outside times of major conflict, such as the Falklands war, we must know our duty. If we seem likely to forget, a rear admiral reminds us with a letter that is about as subtle as a Mafia funeral card."

In other words, he is not objecting to curtailment as such; he is raising considerable doubts as to the methodology, not to mention the official in charge of it. Geraghty regards the D-Notice Committee as a danger to authors. He points to what he calls "the betrayal of authors who cooperate with the system", and cites the case of fellow-writer and veteran journalist John Parker. In September 1998, Parker delivered the manuscript of Death of a Hero, a biography of Robert Nairac, the British officer kidnapped and murdered in Northern Ireland. Eight days later, Pulvertaft phoned the publisher and said he understood Parker, an "informed author", may have included matters damaging to national interests. He offered advice based on "expert opinion" and sent off a list of the media representatives on his committee. Without making a commitment, the publisher submitted the manuscript to scrutiny.

Parker says: "I very soon discovered that relevant sections of my book had been sent to special forces and, presumably, MI5, MI6 and special branch, which was never made clear at the outset. I had named some key sources in the text and referred to others by initials since they were still in sensitive roles. One of those named had, in the meantime, written to me to ask that his name be deleted from the text. Others were approached by the MoD and were asked to do the same, but refused. One wanted to retract completely but it was too late by then."

In the light of his experiences with this and other books that attracted the D-Notice secretary's attention, Parker regards the system as "far from voluntary".

Geraghty has challenged Pulvertaft about the way the system works. He found the secretary to be an "aggressive talker" who "meets questions with questions of his own" and is "difficult to pin down". Pulvertaft says he is not an MoD official, and, although he is paid by that ministry, he is "totally separate" from Whitehall. He confirms that he seeks expert advice from MI5 and other agencies, but insists the process is "ringfenced", in that "other action is not taken" as a result of such consultations.

"The reality", says Geraghty, "is that the system is a bureaucratic jungle into which a writer treads at his peril, and that of his informants. Acknowledgement that the present system is not truly voluntary might at last end a malodorous hypocrisy".