DETROIT (AP) — Five members of a Midwest militia charged with conspiring to rebel against the government and use weapons of mass destruction will remain in jail while awaiting trial, an appeals court said Tuesday, reversing a decision by a federal judge.

Each man is dangerous and "no conditions of release will reasonably assure the safety of the community," two judges on the three-judge panel said.

During a series of raids in late March, authorities arrested nine members of a southern Michigan group called Hutaree. The government claims they were scheming to kill a police officer, then attack law enforcement who attended the funeral, in the first steps toward a broader rebellion.

Over prosecutors' objections, U.S. District Judge Victoria Roberts had said they could await trial at home under strict conditions, including electronic monitors. The government later dropped its opposition to releasing four but took her decision on the other five to the 6th U.S. Circuit Court of Appeals.

Defense lawyers say the men legally possessed weapons and that any talk of killing people was simply stupid, hateful speech with no specific targets planned.

"It is also legal to purchase and own fertilizer and diesel fuel, but if a person who has made threats against the government purchases large quantities of both, it creates a different, more dangerous, implication," judges Boyce Martin Jr. and Raymond Kethledge said.

Judge Helene White said she was in favor of releasing one of the five, Joshua Clough of Blissfield, Mich. She also would have told Roberts to take another look at evidence against Thomas Piatek of Whiting, Ind.

"I find this to be a far closer call than the majority opinion would indicate," White said of the government's appeal.

She said militia members "had never taken any action except for field training, and some of the taped conversations appeared to be in jest."

The decision ends a nearly three-month battle over pretrial detention, an issue that rarely reaches the docket of a federal appeals court.

Roberts will continue to oversee the case as it moves toward trial. She has raised questions about the main charges and said even "hate-filled, venomous speech" is protected by the First Amendment.

The U.S. attorney's office has expressed confidence about the case, saying a detention hearing is not the venue to reveal all evidence against the alleged homegrown extremists.

Besides Clough, 28, and Piatek, 46, the other members detained are Hutaree leader David Stone, 44, and his 21-year-old son, Joshua Stone, both of Lenawee County, Mich., and Michael Meeks, 40, of Manchester, Mich.

Four others under indictment were sent home in May.