(CNN) - A California man who threatened to shoot up the hotel he worked for is facing nearly four years in prison, prosecutors say.
Rodolfo Montoya entered a no contest plea Monday to two felony counts of criminal threats, the Los Angeles County District Attorney's Office said in a news release.
He could spend up to three years and eight months in state prison, the release says.
The 37-year-old worked at a Marriott Hotel restaurant in Long Beach and was planning to shoot his coworkers and guests there, city police said in August.
Police said that a co-worker who tipped them off about Montoya potentially saved lives, CNN affiliate KTLA reported.
"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," Chief Robert Luna had said over the summer.
Police seized firearms, hundreds of rounds of ammunition and tactical gear, including high-capacity magazines and an assault rifle -- which are illegal to possess in the state, police said.
Montoya didn't seem to have a criminal history that would prevent him from legally owning the types of guns allowed in California, Luna had said.