The shooting occurred near the office of District Judge Daniel Shimshock in the Fayette County Magistrate Court in Masontown. Four people were transported to a hospital, a spokesperson for the Fayette County Emergency Management told ABC News.
Fayette County District Attorney Richard Bower said the suspect was killed by a German Township police officer after the unnamed gunman entered the lobby with a handgun and fired shots. Bower did not identify the gunman, saying only that he was due in court on charges related to a recent domestic violence incident.
"In this case, as is so often the case, the German Township police officer ran toward the danger, not away. He protected over 30 to 40 people from injury or death," Bower said.
He added that Masontown police officer Sgt. R. Scott Miller first encountered the gunman and was injured with non-life-threatening injuries when he exchanged gunfire with the shooter. When Miller took cover, Bower said the gunman proceeded to fire shots injuring two men and one woman. Details on their conditions were not known.
At this time we have multiple victims and injuries one being a law enforcement official. There is heavy police presence. We are asking the public to stay away from the area at this time.— TroopB (@PSPTroopBPIO) September 19, 2018
The gunman was facing charges of strangulation, aggravated assault, terroristic threats and simple assault. There was a protection of abuse order against the gunman in the strangulation case. It's unclear whether any of the victims are connected to the allegations.
Officials said that even though the shooting happened near the office of Shimshock, neither he nor his staff appeared to be the intended target of the shooter.
More than a dozen police officers surrounded the building in the aftermath of the shooting, aerial footage shot by ABC Pittsburgh affiliate WTAE showed.
A witness told WTAE that people fled the courtroom as the shooter started to move inside and took shelter in offices and other courtrooms.
ABC News and the Associated Press contributed to this report.