Besides secret agents themselves, who face assassination should their identities become known, no man can have been more grateful for the existence of the Official Secrets Act than Ian Fleming. Had it been known back in the 1950s that MI5 and MI6 were inhabited not by suave womanisers but by dull paper-shufflers who go home on the Tube, his books would not have prospered.
Thanks to David Shayler, the former MI5 officer jailed earlier this week for breaching the Official Secrets Act, the image of the secret services now projected on to the public mind is that of any other government department: a bungling bureaucracy staffed by a mixture of the ambitious, the bored and the devious, fighting little turf wars and gradually being consumed by paperwork. It would be extraordinary if it were any other way: the aura of exoticism which long surrounded secret-service work - the sherry parties hosted by shady dons, the clandestine meetings with agents carrying rolled-up copies of the Times - cannot be expected to exempt it from the institutional arthritis which tends to afflict all large public organisations.
This magazine has some sympathy for David Shayler's observations of life inside MI5. In 1998, during his self-imposed exile on mainland Europe, Mr Shayler wrote of his experiences twice in these pages. In one article he expanded on the frustration of 'spending days poring over the drafting of routine documents', and claimed that had MI5's methods been sharper it could have prevented the IRA bombing of the City in 1993. In the other, he related his fears of what might happen to him after his account of his time at MI5 was published in the Mail on Sunday. 'I really did feel like a dissident in the old Soviet Union,' he wrote. 'Each night I lay awake unable to sleep for fear. Each night I listened out for the sinister knock or the splintering crack at the door before I was quietly and inevitably hauled off to the cells by Special Branch.'
Events have proved Mr Shayler to be over-imaginative. Apart from his allegation that Special Branch officers took his girlfriend's knickers during a raid on his flat, events have failed to sustain his portrayal of MI5 as a British KGB. He has not been bumped off and dumped in a canal, but has been tried in an open court to which reporters were allowed access; the only concession to secrecy being that former MI5 colleagues gave evidence with their faces obscured.
As hard as he has tried, Mr Shayler has failed to portray anything menacing about British secret services. Working for MI5, he was never in a position to have direct knowledge of the alleged MI6 plot which constituted his most sensational revelation: that British secret agents were behind a failed assassination attempt on the Libyan leader, Colonel Gaddafi. Instead it came from rumour, and turned out to be untrue. A further allegation that MI5 wasted time and money pursuing the Guardian journalist Victoria Brittain - who was suspected, wrongly as it turned out, of allowing Libyan terrorists to use her bank account - took on a different perspective when it was revealed in court that Mr Shayler himself had been in charge of the operation: it is his name which appears on forms applying for permission from superiors to bug Miss Brittain's home.
It is in the public interest that the operations of secret services be constrained by laws passed according to the normal democratic process. Mr Shayler's disclosures would be of interest if they revealed that MI5 had been breaking those laws. Yet they suggest the opposite: his frustrations at MI5 set in because of what he describes as an 'obsession with petty rules'. Without evidence of any law-breaking on the part of MI5, the Shayler case revolves around one issue: the right of secret services to behave as per their definition, and keep secrets. Mr Shayler maintains that nothing he did threatened the security of the land, yet the documents he photocopied contained the names of MI5 agents. Mr Shayler, who plans to take his case to the European Court of Human Rights, complaining that his right to freedom of expression has been infringed, should reconsider. Ought his freedom to express himself really take precedence over the right to privacy and the right to life of the agents whose names he revealed? He is behaving like the proverbial man who uses the right to free speech to excuse his hoax cry of 'Fire!' in a crowded theatre.
If there is one matter of concern about MI5 to have come out of the Shayler case, it is that the organisation employed him at all. How did its vetting procedure fail to pick up the fact that while a student at Dundee University Mr Shayler had published extracts from Peter Wright's book Spycatcher? Did that send no alarm signals to his employers as to his ability to keep secrets? Ironically, Mr Shayler's appointment came about as part of an attempt to make more open the procedures of MI5: he responded to one of the organisation's first newspaper job advertisements. Let us hope the government has learnt the lesson: secret services should respect the law, but that does not mean they should not be secretive.