Federal prosecutors defended Wednesday their use of information gathered by the NSA to pursue a domestic terrorism suspect, in a first-of-its-kind case that requires U.S. appeals judges to weigh how the fruits of a pair of surveillance programs can be used in criminal cases.

The appeal was brought by Mohamed Osman Mohamud, a U.S. citizen originally from Somalia who was convicted in a plot supervised by undercover government agents to bomb a Christmas tree-lighting ceremony in Portland, Ore. He is serving a 30-year sentence for the crime.

The question is whether data from foreigners' email accounts and other online communication tools that the eavesdropping agency gathers without a warrant can be freely searched by FBI agents investigating Americans suspected of terrorist ties. While the National Security Agency program targets people overseas, Americans' messages and information — which would typically require a search warrant to access — are often also swept up.

Justice Department lawyer Kelly Zusman argued Wednesday before the 9th Circuit Court of Appeals that because the NSA legally collects the information, other agencies are free to use it.

"Once we have legitimately acquired the information, there's nothing to prevent us from then, for example, looking at every single item," she said.

But Stephen Sady, a lawyer for Mohamud, argued that the government unfairly used information gathered through the spy program against his client.

"What we just heard is, to me, an incredible diminution of the privacy rights of all Americans," he said. Affirming investigators' ability to rummage through information collected by spies, he said, "is a step that should never be taken."

The surveillance — often referred to as "702 surveillance" after the section of a law that authorizes it — was among many aspects of the NSA spying revealed by former contractor Edward J. Snowden. Documents that he turned over to reporters described two programs that rely on the law: Upstream, which involves tapping internet cables, and PRISM, which involves American technology companies handing over data.

The U.S. government has acknowledged the broad outlines of the classified programs, and officials argue that they are vital for fighting terrorism. Privacy advocates have been challenging the constitutionality of electronic eavesdropping programs in court but have found judges unreceptive to their arguments.

In some cases, judges have found that the advocates cannot demonstrate harm caused by the unintentional collection of Americans' information or even that a particular person's information was collected and examined. But that is not an issue in Mohamud's case — the government acknowledged having used information from the spy program to prosecute him, though not until his trial was over.

Patrick Toomey, an attorney for the American Civil Liberties Union who argued in support of Mohamud, said in court that it is not right for the FBI to carry out so-called backdoor searches of information gathered by the NSA. To search the data for information about Americans, he argued, investigators should seek approval from a judge.

"The fact that the government didn't even go to the court for individualized approval of its query ... is enough of a defect to make the surveillance unlawful," he said.

Zusman acknowledged that the use of evidence derived from the NSA surveillance is unusual in the context of criminal cases, but said the approach has been approved by Congress. Zusman said the information that the spying reveals about Americans is limited.

"We're not seeing the contents of anyone's computer," she said. "We're not seeing internet history. We're not seeing other emails to other individuals, and we're certainly not seeing the email account of the U.S. person."

The judges gave no indication of when they would issue a ruling. The law authorizing the surveillance is set to expire next year, and an extension would have to be approved by Congress.

iduncan@baltsun.com

twitter.com/iduncan