WASHINGTON — A federal appeals court on Monday upheld the 2013 conviction of a Somali-American man for trying to detonate a bomb at a Christmas tree lighting ceremony in Portland, Ore., rejecting his arguments that the F.B.I. had entrapped him and that the government had unconstitutionally intercepted his emails without a warrant.

The ruling — by a three-judge panel of the Court of Appeals for the Ninth Circuit, in San Francisco — was particularly important because it upheld the government’s use of emails gathered without a warrant under the FISA Amendments Act of 2008. The law permits the government, on domestic soil, to collect phone calls and emails of noncitizens abroad, even when they are communicating with an American.

The case centered on Mohamed Mohamud, who was 19 when he tried to blow up what he thought was a bomb. In fact, there was no danger: The plot had been orchestrated by the Federal Bureau of Investigation as part of a sting operation. Mr. Mohamud was sentenced to 30 years in prison.

He appealed, arguing that the conviction should be overturned in part because the government had used evidence derived from warrantless surveillance. But the panel upheld the verdict.