LONDON, Feb. 25 — In a sudden reversal, Britain said Wednesday that it would not prosecute a 29-year-old government linguist who admitted leaking a top secret American request for assistance in bugging United Nations diplomats.

The request was made by the United States National Security Agency during the debate over the Iraq war a year ago, according to the linguist, Katharine Gun, and her lawyers.

The case against Ms. Gun, who worked for Britain's General Communications Headquarters, the intelligence agency that intercepts and deciphers communications around the world, was dropped, avoiding a trial that her lawyers said they would have turned into a debate on the legality of Britain's entry into the war.

Ms. Gun's arrest last March and her assertion that she had acted out of conscience to expose what she regarded as an attempt by the United States to undermine the debate at the United Nations, has attracted broad attention.

She received offers of support for her defense from Sean Penn and the Rev. Jesse Jackson, as well as Daniel Ellsberg, who in 1971 handed over to the press a secret Defense Department history of the Vietnam War in what became known as the Pentagon Papers case.

Smiling as she emerged from the Old Bailey criminal court, Ms. Gun, a translator of Mandarin Chinese who spent two years at the agency, said she was "tremendously relieved" over the prosecutor's decision.

In a statement to the court, the prosecutor said the government no longer believed that there was a "realistic prospect of conviction," even though Ms. Gun was prepared to admit that she had willfully violated Britain's Official Secrets Act by leaking a top secret e-mail message to The London Observer.

A trial could have further intensified the debate over the war that has poisoned relations between Prime Minister Tony Blair and a large faction of rebels within his Labor Party.

Moreover, though Ms. Gun's alleged offense was a serious breach of discipline in the intelligence agencies, prosecuting her idealism risked a backlash against the government. Mr. Blair's spokesmen were conspicuously silent on Wednesday, apparently hopeful that the case would disappear from the public agenda.

In a news conference on Wednesday, Ms. Gun spoke for the first time about her decision to make public the memo, which had come from an American intelligence official. She also described how she had turned herself in, cried on the shoulder of her supervisor and then plotted her defense with a civil rights law firm. The lawyers were prepared to argue that she had been compelled to act by the belief that the American and British governments were acting outside international law.

In her comments, she described herself as a naïve graduate language student who had entered the world of high-technology spying at GCHQ, as it is known, unprepared for the hard-bitten realities of secret statecraft and the espionage that undergirds it.

"Most people don't know what goes on in the intelligence services," she said. "Certainly I had very little idea what went on in GCHQ. For me it was a job, a chance to use my languages."

But early last year, when she saw the top secret request from the Americans to spy on United Nations diplomats to glean information that might sway the debate on the war, she was "horrified."

The e-mail message was from Frank Koza, identified as the chief of staff for the regional targets division at the National Security Agency. He was seeking a "surge" in surveillance operations on the six nations — Angola, Cameroon, Chile, Bulgaria, Guinea and Pakistan — that were crucial to winning a majority of the 15 votes on the Security Council for a resolution authorizing war in Iraq.

Foreign minister Dominique de Villepin of France was lobbying swing votes on the Council against an American-sponsored resolution, while Secretary of State Colin L. Powell was trying to rally support for it.

"I felt that the British intelligence services were being asked to do something which would undermine the whole United Nations democratic process," Ms. Gun said.

When she was asked why she would be surprised that Britain and the United States conducted bugging operations to support diplomacy, her lawyer, James Welch, interrupted her to answer, "The fact that it goes on does not make it lawful."

Freed from threat of prosecution, Ms. Gun exhibited a strong idealism, saying that "we all were pretty appalled" to hear that the British government was thinking about invading Iraq after the campaign in Afghanistan to topple the Taliban. She added, "Everybody was just like, `You've got to be kidding.' "

Ms. Gun was formally charged in November under the Official Secrets Act. The attorney general, Lord Goldsmith, must approve any prosecution under the act.

Ms. Gun's lawyers made no secret of their intention to use the trial to revisit the question of whether the Iraq war was legal under international law, an issue that for months has been a prominent feature of parliamentary debates here.

The authority of the United Nations was critical in the British debate. A number of legal authorities said Security Council approval was crucial, and some senior Bush administration officials complained that the Bush administration was investing too much time at the Security Council in an effort to satisfy Mr. Blair's domestic critics.

On March 17, 2003, Mr. Blair released a summary of the legal advice from Lord Goldsmith suggesting that United Nations Resolution 678, which authorized the Persian Gulf war of 1991, could be relied on for an invasion of Iraq in 2003, but a number of legal experts challenged that judgment.

Since then, opposition parties have demanded that Mr. Blair disclose the specific advice he had received from Lord Goldsmith on whether a second, more specific authorization from the Council was needed before Britain could legally join the American-led invasion.

A trial would also have been a forum on the legality of American espionage aimed at influencing the six undecided nations' votes, Ms. Gun's lawyers said.

The second resolution ultimately failed for lack of support. Ms. Gun said she had been disappointed when the war broke out anyway.

"Obviously, looking at the news, tens of thousands of people dead and people mutilated and their homes destroyed, I mean how could I not be disappointed," she said.