Hundreds of people line Main Street in Spring Grove Borough, Pennsylvania, as a procession for three fallen police officers travels north on Wednesday, Sept. 17, 2025. The three police officers were shot and killed in North Codorus Township, York County, according to state officials.
An officer is loaded into a helicopter after a shooting in North Codorus Township, Pennsylvania, on Sept. 17, 2025. Three law enforcement officers were killed and two were wounded.

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. That incident happened outside the home of Ruth's ex-girlfriend.

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 Northern Regional Police Department officers Detective Sergeant Cody Becker, Detective Mark Baker and Detective Isaiah 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.

York County District Attorney Timothy Barker said at a news conference on Sept. 18 that Ruth ambushed officers inside the house before continuing the firefight outside. Pennsylvania Gov. Josh Shapiro called the incident "absolutely tragic." Attorney General Pam Bondi said "Violence against law enforcement is a scourge on our society and never acceptable."

Here’s what we know about the alleged gunman.

Shooting lasted two minutes

The shooting in York County lasted a little over two minutes, District Attorney Barker said at a news conference on Sept. 18.

Barker said law enforcement officers arrived at the residence at 2:02 p.m. They found the door unlocked and, knowing the ex-girlfriend and mother were "somewhere else for their safety," officers entered the house at about 2:08 p.m.

The shooter was stationed inside the house and immediately began firing with an AR-15-style rifle, Barker said.

Becker, Baker and Emenheiser were at the door and went down, according to the district attorney.

A firefight between the shooter and law enforcement continued outside. Law enforcement "fired the last shot" at about 2:10 p.m., Barker said.

Barker said he was ready to present the facts of the case after a thorough review of body-worn camera footage, dashboard camera footage and physical evidence.

Investigators also discovered a black lab shot dead in the basement of the house that belonged to the ex-girlfriend of the shooter.

'We will love you forever,' DA says

District Attorney Barker said that he knew the three fallen officers well and took a moment to celebrate them. He called the trio "mission driven."

"You kept the faith, you ran the race, you fought more than a good fight, you fought the critical fight for us," said Barker, his voice breaking with emotion. "Job well done, mission well served and we will love you forever and all eternity."

Barker also lauded the wounded officers who managed to bring the shooter down.

"If the actor was not eliminated," said Barker, referring to the shooter, "and the threat and murderers rampage were not eliminated, who knows where this would have stopped."

What to know about the motive?

The district attorney said that a full investigation would be needed to uncover the exact steps that led up to the shooting but he said that overall the motive was simply "domestic violence."

"There is one motive that is clear for everything, and that is the hateful scourge of domestic violence," Barker said.

He added that the officers involved in the incident saved the lives of the shooter’s ex-girlfriend and mother, indicating that he would have shot them instead.

"Had they arrived home and not Northern Regional Police Department officers, they would have been killed immediately," Barker said.

Man with rifle near ex-girlfriend's home day before shooting

A day before the shooting, a woman who lives at the home where the attack occured called authorities to report seeing a man in camouflage on her property, adding that the man appeared to be looking into her home with binoculars.

Police arrived on Tuesday, Sept. 16, and spoke to the resident's daughter, who said she believed the man to be Ruth, her ex-boyfriend. She also told investigators that she believed Ruth had set her pick-up truck on fire while it was sitting in the home's driveway in August, according to an affidavit.

Officers searched the family's property surrounding the home but didn't find Ruth, court records show. Investigators did, however, review trail camera footage that appeared to show a man with an "AR-15 style rifle slung across the chest while looking into the residence." The daughter identified the man as Ruth, according to court records.

Police filed multiple charges against Ruth, including misdemeanor stalking, misdemeanor prowling at nighttime and summary criminal trespass in North Codorus Township. While officers were attempting to serve the arrest warrant, they were met with gunfire.

Contributing: Jeanine Santucci

This article originally appeared on USA TODAY: Gunman who ambushed police in Pennsylvania identified: What we know

Reporting by Christopher Cann, Teresa Boeckel and Michael Loria, USA TODAY NETWORK / USA TODAY

USA TODAY Network via Reuters Connect