A trio of men accused of trying to bomb a U.S. mosque and a women’s health center accidentally revealed themselves to police when they tried to place bombs in a rival’s shed, the FBI claims.

Michael Hari, 47; Joe Morris, 22; and Michael McWhorter, 29, are accused of planting a bomb that exploded at a mosque in suburban Minneapolis in August 2017. The three Illinois men are also accused of a failed bombing at a Champaign, Illinois women’s health clinic in November. But the plot blew up in their faces when they tried to frame one of Hari’s rivals for the attacks, authorities allege in new charges released earlier this week.

Five people were inside the Dar Al Farooq Islamic Center on August 5 when they heard the explosion. A bomb had gone off inside the Bloomington, Minnesota mosque, causing extensive damage but no injuries.

McWhorter confessed to his involvement in the both bombings, and told an FBI agent he’d worked alongside Hari and Morris, neither of whom have confessed. Hari was the group’s getaway driver, McWhorter said. When they got to the mosque, Morris smashed the windows with a sledgehammer, and McWhorter threw "huge-ass black powder bomb” through the hold, he told the FBI agent, according to an affidavit in the case.

McWhorter said Hari had come up with the bomb plot, and that they never intended to kill Muslims, only "scare them out of the country … show them hey, you're not welcome here, get the fuck out."

He claimed the trio wanted to bomb Muslims because “they push their beliefs on everyone else,” the FBI agent wrote.

When the trio went three months without arrest, they attempted another bombing, this time at a Champaign, Illinois women’s clinic that provides abortions. Once again, Hari drove the getaway car and Morris smashed a window, this time hurling a thermite device into the clinic in the dead of night, McWhorter said. But the homemade bomb was a dud, and still hadn’t exploded by the time clinic staffer found it on the floor in the morning.

The trio also posed as police officers to raid the home of a suspected drug dealer for cash, and robbed three Illinois Walmarts after the bombings, McWhorter said.

Investigators eyed Hari as a possible suspect in the bombing after a source took pictures of apparent bomb-making materials in Hari’s parents’ home. Hari often lived there because his own house had no running water or electricity.

But investigators made no arrests until the trio inadvertently called the police on themselves.

In January, Hari was involved in an assault case with a man he accused of being on his property. Hari allegedly fought with the man, referred to as “J.O.” in court documents, pinning him to the ground with an airsoft gun pointed at his head. Hari’s trial in the case was scheduled for April 9. So on February 19, authorities say, Hari sent an anonymous tip to the Bureau of Alcohol, Tobacco, Firearms and Explosives to frame J.O. for owning bombs.

“this is a possible terrorism threat i know a man named [J.O.],” the tip read. “he is about 30 years old he is always talking about getting the n****rs and here lately he said he is really going to get them he has been buying a lot of wierd chemicals like nail polish remover and battery acide.”

The tipster claimed J.O. said the supplies were for “a n****r schredder and he has four big black suitcases in his shed and a little greay bag and they are full of stuff like pipes and caps and wires nails and he told me to watch the news this week ... i also sent something about it to the newspaper so if you just blow it off like you did that school schooler kid in florida the press will know you got a tip so you better check it out just saying you did screw up once.”

But when police visited J.O., he led them around his property voluntarily, and appeared surprised to find multiple explosive devices stored in his shed. Investigators stated they believed J.O. did not know how the bombs got there.

That same day, McWhorter made a Facebook post, apparently referencing the bombs. "Clarence gonna be on the news again, this shit is crazy man," he wrote, according to the affidavit.

"Mike Hari?" another user replied in the comments. McWhorter deleted the post shortly thereafter.

The person who provided pictures of the bomb-making materials in Hari’s parents’ home told police that Hari had previously owned propane tanks similar to those used in the bombs in J.O.’s shed.

McWhorter later admitted that he, Hari, and Morris, had planted the bombs in J.O.'s shed to make him look bad in advance of Hari's upcoming assault trial.

An investigation of Hari’s acquaintances led police to McWhorter’s brother, who showed police a bag Hari had dropped off at his home several days earlier. Inside were four shotguns and four assault rifles, three of which had been modified to be fully automatic. “These firearms would meet the definition of a ‘machinegun,’” the FBI affidavit reads.

"Don't tell anyone. I don't want a lot of people knowing I have them." Hari allegedly told McWhorter’s brother, according to the affidavit. "They are lightly modified, two are semi-auto and one is fully auto."

Hari's admission about the modified guns let to the group's arrest. Although none of the trio have been charged in the attempted bombings, all three and a fourth man were arrested Tuesday on charges of owning a machine gun.