MONONGAHELA, Pa. (AP) — State police say an armed man shot and killed by a western Pennsylvania police officer over the weekend had fired at a home where a gathering was taking place.

Forrest Allison, a state police public information officer, told the (Washington) Observer-Reporter that 29-year-old Cody Bennett had been at the gathering at the Monongahela home Sunday night but was kicked out after a dispute.

Allison said Bennett went home and retrieved a gun, then returned and fired shots into the air and toward the house. Monongahela police were called shortly after 9 p.m. Sunday and Allison said Bennett fired shots at a police cruiser, striking the vehicle.

Allison said the officer “continued to drive to get out of the line of fire” and then returned and located the suspect. He said Bennett refused to put down the weapon, and the officer fired one shot.

Get daily updates on local news, weather and sports by signing up for the WTAJ Newsletter

The county coroner’s office said Bennett was pronounced dead about an hour later at Penn Highlands Monongahela Valley Hospital. A ruling on the cause and manner of death is pending. State police are investigating.