Updated

Civil rights attorneys say surveillance evidence used to convict a Somali-American man who plotted to bomb a 2010 Christmas tree-lighting ceremony was gathered unconstitutionally through the U.S. government's warrantless foreign surveillance program.

They laid out their arguments Wednesday before a three-judge panel of the 9th U.S. Circuit Court of Appeals in downtown Portland -- directly across the street from the plaza where almost six years prior Mohamed Mohamud tried detonating a fake bomb that was part of an undercover operation.

Mohamud is appealing his 2013 conviction on grounds that he was entrapped by undercover federal agents posing as al-Qaida members and the warrantless surveillance of his foreign communications violated his constitutional rights.

It marks the first time a federal appeals court is considering whether the National Security Agency's foreign surveillance programs -- the same ones that came under scrutiny after the Edward Snowden leaks a few years ago -- violate the Fourth Amendment rights of criminal defendants.

Stephen Sady, Mohamud's public defender, and another attorney with the American Civil Liberties Union urged the court for a new trial on grounds that the evidence used against Mohamud should've never been allowed in the courtroom.

Sady told the judges that using surveillance information on foreigners, which doesn't require a warrant, to spy on any Americans they communicate with is "an incredible diminution of the privacy rights of all Americans ... That is a step that should never be taken."

U.S. prosecutors defended the program, saying it's perfectly legal under the Foreign Intelligence Surveillance Act to access information on Americans that was obtained through foreign communications.

Kelly Zusman, assistant U.S. attorney, said the information they glean on Americans, such as the communications that was used as evidence against Mohamud, already exists in the NSA databases.

"The query is not a search," Zusman said. "It's simply a means by which we access the information we have already lawfully acquired."

Mohamud, 24, is a Somalia-born naturalized U.S. citizen who was 19 when he attempted the Christmas bombing.

Tung Yin, a professor at Portland-based Lewis & Clark Law School who specializes in national security issues, said it's tough to predict how the court will proceed.  But he said Mohamud only needs to win on one of the arguments for a new trial.

"At one level, it's a question of what can the government do within the bounds of the Fourth Amendment? And a second issue is, even if the government is allowed to do something, should it? And that's not a judicial question, but a political question," Yin said.