The main issue was prosecutors' use of wiretaps obtained under the Foreign Intelligence Surveillance Act, a part of the Patriot Act aimed largely at gathering foreign intelligence.
The recordings were a major piece of a 2½-month trial for the five men, all Muslim immigrants who grew up in the New Jersey suburbs of Philadelphia.
The men - Mohamad Shnewer, Serdar Tatar, and brothers Dritan, Eljvir and Shain Duka - were arrested in May 2007. In 2008, a federal jury in Camden, N.J., convicted them of conspiring to kill U.S. military personnel at Fort Dix. All but Tatar are serving life terms.
Defense lawyers said it was unconstitutional to use the recordings in a domestic criminal case and that it may have been impossible to convict the men without the evidence.
But in a unanimous ruling written by Judge Marjorie O. Rendell, a three-judge panel of the Philadelphia-based 3rd U.S. Circuit Court of Appeals disagreed. The challenged search "was conducted in objectively reasonable reliance on a duly authorized statute," and therefore admissible at trial, Rendell wrote.
Another major issue came from an error that federal prosecutors acknowledged in January: Three of the men were convicted of attempted possession of firearms in furtherance of a crime, but the law in question does not have a provision that outlaws attempted possession.
In the case of that count against Dritan and Shain Duka, the judges said defense lawyers should have raised it before the trial judge. Since they didn't, the judges said, it should not be overturned. The judges also said that there was evidence at trial that the two actually possessed weapons.
But the case of Shnewer was different. The court ruled that there was no evidence he possessed the weapons. As a result, his weapons conviction was dismissed, along with the 30-year prison term that went with it.
He is still serving a life term.
Richard Sparaco, a lawyer for Tatar, said Wednesday that he would consult with his client but expected he would file an appeal. Rocco Cipparone, who represents Shnewer, said he would likely pursue an appeal to the U.S. Supreme Court on the parts of the conviction that were upheld.
Follow Mulvihill at http://www.twitter.com/geoffmulvihill