According to the Long Beach Police Department (LBPD), law enforcement was contacted Monday by a concerned employee of the hotel. The employee told police that Montoya allegedly made verbal threats of violence.

Montoya, a cook at the hotel, allegedly threatened to “shoot up” employees and customers, LBPD Chief Robert Luna said. Montoya is also accused of sharing detailed plans of an attack with the employee, including a description of the weapons he would use. Investigators said they believe Montoya was upset over an incident at work involving human resources, though they refused to reveal any other details.

“Suspect Montoya had clear plans, intent and the means to carry out an act of violence that may have resulted in a mass casualty incident,” Luna told KTLA.

Detectives arrested Montoya at home without incident. When investigators searched his Huntington Beach, California home, they seized multiple firearms and hundreds of rounds of ammunition.

Montoya’s stash included high-capacity magazines and an assault rifle, both of which are illegal to own in California. On Wednesday, he was charged with manufacturing and distributing assault weapons, possession of an assault weapon and making a criminal threat. Montoya is being held on $500,000 bail in the Long Beach City Jail.

Luna said that Montoya did not have a criminal history preventing him from purchasing his legally-owned firearms. However, detectives are looking into how he obtained the assault rifle and high-capacity magazines.

“In recent months, we have seen several tragic incidents that have resulted in many lives lost,” Luna said in a statement. “The witnesses who came forward and the diligence of our employees involved in this investigation very likely prevented a threat of violence and saved many lives.”

This month has seen two of the deadliest mass shootings in America. Patrick Crusius, 21, killed 22 people at a Walmart in El Paso, Texas. Hours later, Connor Betts, 24, killed nine people at a bar in Dayton, Ohio.

Since the attacks, a number of people suspected of planning mass shootings have been arrested. On August 8, Conor Climo of Las Vegas was arrested after the FBI found that he had connections to neo-Nazi organizations. Climo planned to attack a local synagogue and a gay bar.

James Patrick Reardon of Youngstown, Ohio was arrested August 16 after he posted a video captioned “Police identified the Youngstown Jewish Family Community shooter as local white nationalist Seamus O’Rearedon.” The video showed Reardon firing a gun. He was arrested before any attack could take place.

Justin Olson, a Boardman, Ohio man, was arrested for making online threats to assault law enforcement officers and attack a Planned Parenthood. He later told officers his comments were jokes.