(AFP) US authorities on Monday charged an Ohio man with providing material support to the Islamic State for an alleged plan to carry out a mass shooting attack at a synagogue.

Damon Joseph, 21, allegedly had made a detailed plan to kill worshippers at a synagogue in the city of Toledo during the Jewish Sabbath, which begins at sunset Friday and lasts until nightfall Saturday.

He was arrested Friday when he picked up two semi-automatic assault rifles from a federal undercover agent. Police said the rifles had been rendered inoperable.

An affidavit filed in federal court claimed Joseph was inspired by Islamic State online propaganda and the October shooting at a Pittsburgh synagogue — the worst anti-Semitic attack in modern US history in which 11 were killed.

“I admire what the guy did with the (Pittsburgh) shooting actually,” Joseph wrote to an undercover agent, according to the affidavit.

“I can see myself carrying out this type of operation inshallah,” he was quoted as saying, using a common Arabic-language expression which roughly translates to “God willing.”

A day before his arrest, authorities said Joseph provided a plan for his attack — including the address of the synagogue and research to identify when more worshippers would be present.

An undercover agent met Joseph at a predetermined location Friday and he took a duffel back containing two AR-15-type rifles, according to the affidavit. He then was arrested.

“This man spent months planning a violent terrorist attack on behalf of ISIS here in the United States,” US Attorney Justin Herdman said in a statement.

“The charges describe a calculated man fueled by an ideology of hatred and intent on killing innocent people.”

Joseph came to the attention of the FBI in May, when he began distributing messages of support for the Islamic State on social media, authorities said.

An undercover agent began communicating with Joseph. Over the subsequent months, he expressed an interest in supporting Islamic State propaganda operations and, eventually, to carrying out an attack.

If convicted, Joseph could face up to 20 years in prison.