(CNN) A gunman who opened fire Wednesday at a municipal building in a small Pennsylvania town was shot dead by a police officer responding to the incident in which four people were wounded, state police said.

The gunman entered the Masontown Borough Municipal Center around 2 p.m. and began firing, Lt. Steve Dowlin of the Pennsylvania State Police told reporters.

The four victims included a sergeant from the Masontown police department. Their injuries are not life-threatening, Dowlin said.

The suspect had a restraining order against him related to a choking case that was to be heard Wednesday afternoon, Fayette County District Attorney Richard Bower said.

The suspect had been charged with strangulation, aggravated assault, terroristic threats and simple assault as a result of a domestic matter several weeks ago, Bower added.

Read More