PORTLAND, Oregon (AP) -- A federal judge has affirmed the legality of the U.S. government's secret, warrantless bulk phone and email data collection in denying an Oregon man's motion to dismiss his terrorism conviction.

U.S. District Court Judge Garr King on Tuesday upheld Mohamed Mohamud's conviction on terrorism charges.

In doing so, he rejected the argument from Mohamud's attorneys that prosecutors failed to notify their client of information derived under the U.S. Foreign Intelligence Surveillance Act until he was already convicted.

That failure, they say, withheld important information from the defense team and violated Mohamud's constitutional rights.

Mohamud, a Somali-American, was convicted last year of attempting to detonate a bomb at Portland's Christmas tree-lighting ceremony in 2010.

The purported plot was actually an FBI sting, and the bomb was a fake.