GRANTS PASS, Ore. (AP) — A federal appeals court Friday overturned the conviction of a man who operated an Oregon-based Islamic charity on charges he smuggled money out of the country to help Chechen rebels fight Russian forces.

The ruling Friday from the 9th U.S. Circuit Court of Appeals in San Francisco was highly critical of prosecutors' handling of the case against Pete Seda, an Iranian-born U.S. citizen.

"This is a tax fraud case that was transformed into a trial on terrorism," Judge M. Margaret McKeown wrote for the three-judge panel.

"The appeal illustrates the fine line between the government's use of relevant evidence to document motive for a cover up and its use of inflammatory, unrelated evidence about Osama bin Laden and terrorist activity that prejudices the jury."

Seda worked for many years as a tree surgeon in Ashland, Ore., where he also operated the Al-Haramain Islamic Foundation and was an outspoken proponent of the peaceful aspects of Islam.

He was convicted in 2010 of using the foundation to help smuggle $150,000 to Saudi Arabia in 2000 and signing a fraudulent tax return to cover it up. During the trial, Seda blamed the tax return on his accountant and maintained the money was for humanitarian aid.

The foundation was disbanded after the U.S. government declared it was a terrorist organization and froze its assets.

A federal trial judge said at Seda's 2011 sentencing that there was no proof directly linking him to terrorism, although the judge said he had no doubt the money went to Islamic fighters in Chechnya, as the prosecution maintained.

The appeals court said Friday that the government failed to provide a fair and complete summary of classified material to Seda's defense team, failed to disclose that a key prosecution witness had been paid and exceeded the scope of a search warrant used to search computers seized from the foundation.

It wasn't until after the trial — but before the sentencing — that prosecutors revealed that the FBI had paid $14,500 to the late husband of Barbara Cabral, a former member of Seda's prayer house and the only witness to say that Seda wanted to help Chechen fighters.

Story continues

The court found that because of that failure, Seda's lawyers were unable to cast doubt on Cabral's testimony.

The court also found that the government went far beyond the scope of the search warrant, which was specifically limited, to pull out evidence of visits to websites about Chechnya, emails with people not related to the tax case and background information about Chechen mujahedeen.

"The government should not be able to comb through Seda's computers plucking out new forms of evidence that investigating agents have decided may be useful, at least not without obtaining a new warrant," the ruling said.

Because his conviction on money-laundering and tax-evasion charges didn't include a terrorism enhancement, Seda was sentenced to just 33 months in prison. He was released Friday from a halfway house in Portland, where he had been staying after serving time at a federal prison in Colorado.

Portland defense attorney Steve Wax said his client's release had been previously scheduled and wasn't prompted by the court ruling.

Prosecutors are reviewing the ruling, U.S. Attorney for Oregon Amanda Marshall said in an email.

"Any decision about whether we will seek further review will have to be made in consultation with the Criminal Division and Solicitor General's Office in Washington, D.C.," she wrote.