(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.

Read More