A potential “tragedy” was averted in New York City on Saturday when police arrested two heavily armed men who allegedly intended to attack a Manhattan synagogue, according to prosecutors.

Metropolitan Transportation Authority officers arrested the two men at Penn Station. The men had a firearm, a high-capacity magazine, ammunition, an 8-inch long military-style knife, a swastika arm patch, a ski mask and a bulletproof vest, “among other things,” Manhattan District Attorney Alvin Bragg said in a statement.

“Hateful antisemitic targeting of synagogues is deplorable,” Bragg said, adding that “online postings indicated an intent to use these weapons at a Manhattan synagogue.”

Christopher Brown, 21, of Aquebogue, New York, was charged with making a terroristic threat, aggravated harassment and criminal possession of a weapon, according to police. Matthew Mahrer, 22, of New York, New York, was charged with criminal possession of a weapon.

“The Manhattan DA’s office will now pursue accountability and justice in this case with the full resources of our counter-terrorism program and recently enhanced and expanded hate crimes unit. We do not tolerate illegal guns or hate in this city,” Bragg said.

Colorado Springs shooting live updates:Suspect faces 5 counts of murder, hate crimes

The complaints detail Twitter posts allegedly made by Brown that discuss plans to “brutally murder people.”

“Gonna ask a Priest if I should become a husband or shoot up a synagogue and die,” Brown allegedly wrote on Twitter Thursday, according to the complaint.

“This time I’m really gonna do it,” he allegedly wrote the next day.

It is unclear which synagogue in the area Brown and Mahrer allegedly targeted. Attorneys for Brown and Mahrer did not immediately respond to requests for comment from USA TODAY.

According to the complaint, Brown told an officer he and Mahrer met at a cathedral early Saturday and “wanted to get the blessing.”

“I have Nazi paraphernalia in my house. I think it is really cool. I also operate a white supremacist Twitter group,” Brown allegedly told the officer, according to the complaint.

Brown was arraigned Sunday and is being held without bail. Mahrer was arraigned Saturday, and the court set bail at $150,000 cash or $300,000 bail. Both men are expected to appear in court again Wednesday.

Michael Driscoll, assistant director of the FBI’s New York field office, said Monday there was no information indicating a continued threat to the Jewish community related to the case.

“Both subjects are both facing state charges,” Driscoll said. “No decision has been made yet regarding possible federal charges. That investigation continues.”

‘We all feel shock and grief’:Colorado Springs community mourns Club Q shooting victims