Three police officers were killed and two others critically injured in a shooting in the US state of Pennsylvania, while following up on a domestic-related investigation, authorities have said.

Pennsylvania State Police Commissioner Colonel Christopher Paris stated that the gunman was fatally shot by the police.

The incident occurred just after 14:00 local time (18:00 GMT). Images from the scene showed an injured officer being airlifted in a medical helicopter.

This tragic incident prompted a nearby school district in Spring Grove, Pennsylvania, a small town of about 2,500 residents, to briefly shelter in place, although the school later clarified that it had not been affected.

Officials confirmed that there was no active threat to the public following the shooting, which took place in a rural area of York County in North Codorus Township, approximately 100 miles (160 km) east of Philadelphia. Officers were on the scene for an investigation that had begun the day prior.

The investigation is ongoing, and police have withheld many details. Pennsylvania Governor Josh Shapiro arrived at the scene in the afternoon and met with the families of the fallen officers, expressing his condolences. We grieve for the loss of life of three precious souls who served this county, served this commonwealth, served this country, Shapiro remarked, adding, This kind of violence is not OK; we need to do better as a society. As a mark of respect, Shapiro ordered all flags in the state to be lowered to half-mast.

FBI Director Kash Patel announced that agents were providing assistance to local and state law enforcement partners. Our prayers are with the officers, their families, and the entire York County community, Patel said in a statement.