TRENTON - A federal appeals panel on Wednesday upheld the convictions and sentences of five Muslim men accused of planning to attack Fort Dix or other military bases, though it threw out a charge against one defendant.

The main issue was prosecutors' use of wiretaps obtained under the Foreign Intelligence Surveillance Act.

The recordings were a major part of the 21/2-month trial for the five men, all Muslim immigrants who grew up in South Jersey.

Mohamad Shnewer, Serdar Tatar, and brothers Dritan, Eljvir, and Shain Duka were arrested in May 2007. In 2008, a federal jury in Camden 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 might 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 U.S. Court of Appeals for the Third Circuit in Philadelphia 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. Because they didn't, the judges said, it should not be overturned. The judges also said there was evidence at trial that the two actually possessed weapons.

But Shnewer's case was different. The court ruled 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 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.