Authorities said a Massachusetts man was arrested Saturday after he allegedly stockpiled a trove of weapons and made threats against the lives of President Barack Obama, Muslims and police officers.

Federal agents arrested Joseph Garguilo, 40, at his Holliston home. He was charged with possessing ammunition in violation of an active existing restraining order, according to the U.S. Attorney’s Office for the District of Massachusetts.

A federal criminal complaint states that upon searching the residence, agents found 10 gun magazines, parts to assemble an AR-15 rifle, chemicals that could be combined to create an explosive device and handwritten notes threatening violence against people of Islamic faith.

The FBI first learned of Garguilo’s weapons stockpile and alleged threats in a July 27 tip from a female acquaintance of Garguilo’s, according to an affidavit from FBI Special Agent Maximilian Fox.

The woman, whose name was redacted, told authorities that Garguilo was hoarding weapons as well as food, water and explosives materials. She also told them Garguilo had said “he will plant bombs in police stations…and kill as many homeland security officers as he can before they kill him,” according to the affidavit.

During an interview with FBI agents, the woman said that “Gargulio believes that the structure of America will collapse and that America is going to enter a state of martial law,” according to the affidavit.

Contacted by the bureau, Holliston police said they were “familiar” with Garguilo and noted that he “had been involved in some kind of hit and run incident.”

In late August, a second acquaintance of Garguilo’s contacted the FBI to inform them that he had seen a trove of knives, body armor vests and a partially assembled AR-15 during a visit to his Holliston home. The affidavit states that during the visit, Garguilo reportedly said “he wants to attack a mosque and/or kill President Obama.”

He allegedly told the visitor that he plans to “chain a mosque closed and burn it down” and to “burn every motherfucker down in there,” according to the affidavit.

Garguilo made no mention of a particular mosque or when he planned to carry out the mosque attack, although he allegedly said that he “should have taken the opportunity” to kill President Obama when he was on vacation in Martha’s Vineyard in August, according to the affidavit.

Authorities learned of that startling allegation on Aug. 25 and searched Garguilo’s house on probable cause the next day.

Garguilo is not licensed to carry in the state of Massachusetts, according to the FBI.

He is due to appear in district court in Boston on Monday and it’s unclear whether he’s retained an attorney. Garguilo faces up to 10 years in prison, three years of supervised release, and a fine of $250,000, according to the U.S. Attorney’s Office.

Read the complaint below: