Two of three men charged with bombing a Bloomington mosque pleaded guilty on Thursday, admitting that they were part of a white nationalist militia that terrorized people in three states for nearly six months.

Michael McWhorter, 29, and Joe Morris, 23, face 35 years to life in prison after admitting in federal court that they and another man, Michael Hari, started the militia in the summer of 2017 called the “Patriot Freedom Fighters.”

The two pleaded guilty to five charges against them — three from Illinois and two from Minnesota — ranging from obstructing by force or violence the free exercise of religious beliefs to weapons and arson charges. Two other federal charges against them were dismissed as part of the plea deal. A sentencing date has not been set.

Hari, 47, who faces similar charges, has pleaded not guilty and faces a trial in July.

“The defendants’ criminal acts are reprehensible and antithetical to our values as a nation,” U.S. Attorney Erica MacDonald said in a statement. “Every individual has the fundamental right to live life free from the threat of violence and discrimination, no matter who they are, what they believe, or where they worship.”

Judge Donovan Frank asked McWhorter and Morris about their roles in the bombing. After forming the militia, they acknowledged renting a truck, buying 20 pounds of black powder ammunition, then driving to the Dar al-Farooq Islamic Center, targeting the mosque because they believed it was less likely they would get caught. They avoided toll roads and left their cellphones at home. An hour before crossing into Minnesota, they said Hari stopped at a gas station and filled a canister with diesel fuel and gasoline. Then they said Hari told them there was a pipe bomb in the truck, and they were going to bomb the mosque.

In a court pleading, they admitted to targeting Dar al-Farooq, believing that it was a focal point of terrorist recruiting and to send a message to Muslims.

“Did you intend to communicate to Muslims that they are not welcome in the United States and should leave the country?” Frank asked both men.

“Yes, your honor,” McWhorter said during his hearing, wearing an orange jail jumpsuit.

“Yes, sir,” Morris replied at his plea hearing.

McWhorter admitted to throwing the pipe bomb inside the mosque, while Morris said he threw in the fuel canister. The bomb exploded inside the imam’s office, igniting the gasoline mixture. The building’s sprinkler system put out the flames.

Though morning prayers were beginning at the mosque, no one was injured.

After the mosque bombing, McWhorter and Morris said they changed the militia’s name to the “White Rabbits 3 Percent Illinois Patriot Freedom Fighters” militia. It consisted of them, Hari and at least five others. The White Rabbits went on a crime spree.

McWhorter and Morris admitted to trying and failing to set on fire a women’s health clinic in Champaign, Ill., in November 2017.

In December they robbed two Walmarts with fake guns. Also that month, they were part of a home invasion in Indiana, where they used converted machine guns and masqueraded as police officers to rob the people inside. Hari is a former sheriff’s deputy.

McWhorter and Morris said they also took part in an attempt to extort the Canadian National Railway in January 2018. After sabotaging part of a railroad track in Illinois, they used an online inquiry form to send a message to the Railway that it would happen again unless they were paid more than $190,000 in cryptocurrency.

Jaylani Hussein, executive director of the Council on Islamic-American Relations Minnesota, said he would like to see the men sentenced to life.

“We would like the sentence to be appropriate for the amount of carnage and chaos they caused,” he said.

He also worried about further threats against the mosque.

“There are four others we don’t know about,” Hussein said. “We don’t know how they were alerted to this mosque.”

Assistant Attorney General Eric Dreiband of the Civil Rights Division said in a statement that his office would continue to prosecute people who commit hate crimes.

“The Justice Department is committed to holding hate crimes perpetrators accountable under the law for their dangerous and criminal actions against innocent community members,” he said.