How a GCHQ translator uncovered an American dirty tricks campaign

Under any other circumstances Katharine Gun would at least have been tried for breaching the Official Secrets Act. She has never denied that as an employee of the GCHQ she leaked secret information which ended up in a Sunday newspaper.

But there was one festering fact which made it impossible for the Government to allow the case to continue - Iraq.

From the advice of the Attorney General, Lord Goldsmith, about the legality of the war, to tales of dirty tricks involving British intelligence, a trial in the full glare of publicity would have led to highly embarrassing revelations for Tony Blair.

So Katharine Gun walked free from the Old Bailey yesterday, a heroine to those who opposed the invasion. Her actions had received widespread international publicity, with vocal support across the Atlantic from, among others, the actor Sean Penn, the civil rights leader and presidential candidate the Reverend Jesse Jackson, and Daniel Elsberg, the Pentagon Papers whistleblower.

In the wake of the Iraq war, five Congressmen wrote an open letter to Mr Blair stating: "The British and American public deserved to know all the elements involved in the build up to the war. Whistleblowers play an essential role in democracy."

Yet it was by chance that Ms Gun, 29, found herself in a position to so publicly undermine the case for war. By all accounts she had no more than an average interest in politics and international relations, and only joined GCHQ as a translator after unsuccessfully applying for other jobs to suit her 2:1 degree in modern Chinese and Japanese attained at Durham University.

Ms Gun's parents, Paul and Jan Harwood, met when they were students at Durham. In 1977 the family moved to Taiwan, where Mr Harwood took up a teaching post. Katharine grew up there before returning to England to take her A-levels and then going to Durham. Soon afterwards she married a man of Turkish extraction.

Mr Harwood, a lecturer in English literature at Tunghai University, remembers his daughter in her formative years as a "principled and honest" girl, but not a natural activist. Her mother said: "Katharine is idealistic and not a bad person. Whatever trouble she was in, we were right behind her."

Ms Gun had no difficulty with her vetting for GCHQ, and appeared to have fitted in without any problems. The main role of the service is to act as the Government's eavesdropping centre, carrying out domestic and international electronic surveillance. It works closely with its American counterpart, the National Security Agency. Ms Gun's linguistic skills meant she was a relatively junior translator and monitor on China and, to a lesser extent, Japan. Her role was to translate intercepted communications, written and verbal, and pass it on to analysts.

When the Prime Minister first mooted the possibility of war, Ms Gun's reaction, and that of many of her friends, was one of incredulity. "I felt at the time, when the Government started mentioning Iraq, 'you have to be joking', and then suddenly it snowballed into something everyone was agreeing with," she said.

But the inexorable slide to war continued. It was in this atmosphere of recriminations and accusations that Ms Gun found herself with information that she felt was so worrying it must be made public.

Washington and London were facing a struggle to convince other members of the United Nations of the need to overthrow Saddam Hussein by force. Ms Gun was part of the team monitoring the Chinese delegation on the Security Council, who were very much a target for surveillance by British and American intelligence.

In February, with diplomatic activity at its most frenetic, Ms Gun came across an e-mail to GCHQ from Frank Koza, a senior official of the National Security Agency. It was requesting help with an eavesdropping "surge" on delegates from six non-permanent members of the Security Council whose "swing votes" would be crucial if the US and Britain were to drive through a second UN resolution.

Ms Gun recalled: "I was pretty horrified. I felt the British intelligence services were being asked to do something that would undermine the whole UN democratic process itself."

After days of soul searching she told a friend what she had discovered. She, in turn, passed it on to a freelance journalist, who approached The Observer with the information. After three weeks of research, the newspaper published the story on 5 March last year.

"When I originally leaked it I had no idea if anybody would be interested in it. Personally, I felt very strongly about it and I hoped the press would get their teeth into it. I was hoping to pour some cold water on people's heated debate about the war. I wanted people to stop and have a logical and dispassionate discussion about why we were going to war and what it would mean.

"I am just baffled that in the 21st century we as human beings are still dropping bombs on each other as a means of resolving issues," she said.

Ms Gun had been unprepared for the furore which followed. As a hunt started for the source, she decided to confess.

"I am a pretty emotional person and I felt I just couldn't go on working there after what I had done. I went to my line manager. I trusted her and respected her. She put her arm around me and I cried on her shoulder. She was great about it."

Ms Gun was arrested, questioned and spent a night in custody before being released on bail. For the next eight months she was repeatedly questioned and re-bailed, before being charged under the Official Secrets Act.

Liberty, the civil rights group, took over Ms Gun's defence, and Ben Emmerson QC, a specialist in human rights laws, was appointed counsel.

The crux of the defence was that Ms Gun had taken the action because, she felt, the British government had acted illegally, both in taking part in the war without UN backing, and being involved in a plot to bug UN delegates.

Ms Gun's legal team demanded disclosure of government documents pertaining to the legality of the war. On Tuesday, they made a request for a full account of the advice Lord Goldsmith had given about the legal justification for war - something ministers had repeatedly refused to do.

James Welch, the Liberty solicitor acting for Ms Gun, said: "Our case was that any advice the Government received on the legality of war was relevant to Katharine's case and we were prepared to go before a judge and argue for it to be disclosed. We served the document at lunchtime and just before 5pm yesterday I received a phone call saying it was the intention to drop the case."

It took just 18 minutes at Court 7 of the Old Bailey yesterday for the proceedings to be formally ended after Mark Ellison, acting for the Crown, said no evidence would be offered by the prosecution.

Ms Gun, who had pleaded not guilty, shook slightly after being discharged. "I feel I have acted with decency and honesty throughout this whole affair and I have absolutely no regrets about what I have done. I know it's very difficult and people don't' want to jeopardise their careers, or lives, but if there are things out there that should really come out, hey, why not," she said after leaving court.

SPILLING THE BEANS: OTHER SPY CASES

SARAH TISDALL

Sarah Tisdall, a Foreign Office clerk, was jailed in 1984 for six months for passing documents relating to Cruise missiles to The Guardian.

CLIVE PONTING

Clive Ponting, a senior civil servant, was acquitted at the Old Bailey in 1985 after pleading not guilty to breaching the Official Secrets Act over his leaking of documents relating to the sinking of the Argentine warship General Belgrano during the Falklands conflict.

CATHY MASSITER

Cathy Massiter, a former MI5 officer, revealed that the agency had bugged anti-nuclear campaigners. She also told a Channel 4 television documentary that MI5 had been bugging the telephones of politicians and human rights campaigners. She was not prosecuted.

PETER WRIGHT

Ex-MI5 officer Peter Wright claimed in his book Spycatcher in 1987 that he and a small number of other MI5 officers plotted to smear Harold Wilson, the former Labour prime minister.

RICHARD TOMLINSON

Former MI6 officer Richard Tomlinson was jailed for 12 months for the unlawful disclosure of information under the Official Secrets Act. He had pleaded guilty in 1997 to passing a synopsis of a book about his experiences to an Australian publisher.

DAVID SHAYLER

MI5 traitor David Shayler was jailed for six months in 2002 for risking British agents' lives by his "blinkered arrogance". An Old Bailey jury convicted him of three charges under the Official Secrets Act after selling top secret documents to a newspaper for £40,000. The documents contained the names of agents. He claimed he was a whistleblower trying to expose corruption in the secret service.