Philadelphia police on Thursday identified the 29-year-old man who was fatally shot by an officer after he allegedly fired a gun at several officers during a confrontation Wednesday afternoon after a pursuit from Bucks County, where he was suspected in a shooting there.

Terrance Bey was shot in the head by a 15th Police District officer at Adams and Whitaker Avenues near Roosevelt Boulevard approximately 3:15 p.m., the department said in a statement. Bey was pronounced dead at the scene by medics.

Police said Bey was armed with a Glock 22, .40-caliber semiautomatic pistol with an obliterated serial number.

According to the Philadelphia police statement, police in Middletown Township responded around 2 p.m. to a report of a domestic dispute at the Racquet Club Apartments on the 2000 block of Veterans Highway involving someone who was armed.

A witness pointed to Bey, and a Middletown Township police officer approached him.

“Bey turned around, hand in his front waistband area, and walked towards the Officer. The officer drew his weapon, and commanded Bey to show his hands; Bey refused, and started running to the back of the apartment building,” according to the police statement.

The officer lost sight of Bey, but then heard a gunshot and glass shattering. The officer found a sliding-glass door had been shot and a man exited the apartment holding his face and yelling, “He shot me. Please help.”

The officer helped the man and saw Bey flee in a Volvo.

Officers from several departments in Bucks County began chasing the Volvo. The pursuit entered Philadelphia and ended at Whitaker Avenue and Roosevelt Boulevard when a police sergeant from Middletown Township performed a “pit” maneuver, using his vehicle to hit the Volvo in an attempt to stop it.

The Volvo spun around and was facing a police cruiser from Lower Makefield. The sergeant in that cruiser saw Bey point a gun at him, according to the police statement. The sergeant rammed his cruiser into the Volvo. He ducked below his dashboard and heard gunshots.

The sergeant then saw Bey run across the Boulevard and point his gun at him, according to the statement. He lost sight of Bey but heard more gunshots.

A police officer from Lower Makefield who also was involved in the pursuit fired at least one shot at Bey after Bey pointed his gun at the officer, according to the statement.

A responding Philadelphia counterterrorism officer saw Bey running toward the Sunoco and fire his gun at police, according to the statement.

It was at this point that the 15th Police District officer fired at least one shot and hit Bey.

No officers were reported injured. Their names were not immediately released.

Bucks County District Attorney Matt Weintraub on Wednesday said that the shooting victim in Middletown Township was at St. Mary Medical Center in serious condition.

Philadelphia Police Commissioner Danielle Outlaw said in a statement Thursday: “I am grateful that there were no additional injuries to civilians or police officers, and hope for a fast and full recovery to the victim of the initial shooting. I assure the public that the Officer Involved Shootings Investigations Unit will conduct a thorough investigation into this incident, and will subsequently present their findings to the District Attorney’s Office.”