Officials on Thursday, Sept. 18, identified the man they say ambushed law enforcement officers in rural Pennsylvania, killing three people and injuring two others in one of the worst attacks on police the state has seen in decades.

Authorities say Matthew Ruth, 24, who was fatally shot by police during the standoff, opened fire on officers outside a home in North Codorus Township on Sept. 17. The officers were there to arrest Ruth on multiple charges related to a reported stalking incident the day before.

Three officers were fatally shot and two were injured. The wounded officers remained in critical condition on Sept. 18, but were listed as stable.

The officers gunned down in the shooting have been identified as Detective Sergeant Cody Baker, Detective Mark Baker and Detective Isaih Emenheiser. Authorities have not released the names of the wounded officers but said one was a Northern York County Regional detective and the other was a York County Sheriff’s Office deputy.

Police say Ruth appeared to be laying in wait for officers before launching his rampage from a cornfield near the home where his ex-girlfriend lives. Pennsylvania Gov. Josh Shapiro condemned the killing and called the incident "absolutely tragic." Attorney General Pam Bondi said "Violence against law enforcement is a scourge on our society and never acceptable."