The Philadelphia man who was fatally shot by police after leading them on a high-speed chase down I-95 on Wednesday had just shot a “Good Samaritan” who was trying to protect the man’s girlfriend after a violent domestic dispute, police in Bucks County said Friday.

Terrance Bey, 29, died after a Philadelphia Police officer shot him in the head about 3:15 p.m. during a confrontation at Adams and Whitaker Avenues near Roosevelt Boulevard, according to police. Bey crashed his car at the intersection, and fired a Glock handgun with an obliterated serial number at the officers who had been chasing him.

The name of the 15th District officer who fired the fatal shot had not been released as of Friday, and the investigation is ongoing.

» READ MORE: Philly police ID man fatally shot by officer

Investigators in Middletown Township, where Bey first encountered police, said the conflict began hours earlier, when their officers received a 911 call reporting a domestic disturbance at the Racquet Club Apartments.

Bey and his girlfriend — whom police did not identify — had gotten into an argument that escalated to violence, and the woman fled her apartment, according to Lt. Stephen Forman.

The woman, 28, ran across a grassy field separating two of the complex’s buildings, and spotted a neighbor sitting on her porch. Asking the woman for help, Bey’s girlfriend ran inside the home, where the neighbor called police, Forman said.

The neighbor’s husband, 65, told Bey when he came to the door to leave, saying he didn’t want Bey’s domestic problems in his home, according to Forman.

“He was being a Good Samaritan, getting Bey’s girlfriend in there until police arrived,” Forman said. “I don’t think in his mind he thought it was going to escalate to what it did.”

When officers arrived, Bey fled. As one of the Middletown officers chased him, Bey attempted to “ambush” the officer by hiding around the corner of a building, and pointing his gun at his pursuer, Forman said. The officer spotted Bey, ran to safety, and called for backup when Bey ignored commands to drop his weapon.

» READ MORE: Police fatally shot a man in Northeast Philly. They believe he shot someone in Bucks County.

As more officers arrived at the Racquet Club Apartments, Bey ran into the neighbor’s apartment and fired a single shot, striking the husband in his jaw. He then sped away from the apartment complex, beginning the chase that would end in gunfire in Philadelphia.

The man Bey shot was taken to St. Mary Medical Center, where he underwent surgery. Forman said Friday that he remained in the hospital’s intensive care unit, and, though seriously wounded, is expected to survive.

Court records show Bey could not legally possess a firearm because of a 2011 guilty plea in Philadelphia for possessing a firearm with an obliterated serial number, a felony. He was convicted of illegally possessing a gun again in 2018. Bucks County investigators said Bey also had active warrants for his arrest for probation violations, as well as drug and firearms violations.

After the shooting, detectives in Middletown searched his girlfriend’s apartment and found heroin, crack cocaine, methamphetamine, and packaging materials, investigators said.

“Unfortunately for him, he chose his actions … and there was no doubt he was going to try to kill one of our officers, based on the events of the apartment there,” Forman said. “He showed an extreme indifference to life and propensity to violence.”