DALLAS — A former suburban Dallas police officer testified Thursday at his murder trial that he felt he had no choice but to use deadly force the night he opened fire on a carload of black teenagers leaving a house party, which resulted in the death of a 15-year-old boy.

Roy Oliver, who is white, was fired from the Balch Springs Police Department after the shooting in April 2017. He told jurors that he decided to fire on the car when he saw it moving toward his partner, Officer Tyler Gross. The gunfire killed high school freshman Jordan Edwards, who was in the front passenger seat.

Maxwell Everette, 17, friend of Jordan Edwards who was in the vehicle the night Jordan was shot, is led by lead prosecutor Michael Snipes after tearing up while giving testimony on the second day of the trial of fired Balch Springs police officer Roy Oliver, who is charged with the murder of 15-year-old Jordan Edwards, at the Frank Crowley Courts Building in Dallas on Aug. 17, 2018. Rose Baca / The Dallas Morning News via AP, Pool

Oliver said he thought Gross was in danger, but Gross previously testified that he didn’t fear for his life and never felt the need to shoot. A prosecutor earlier called Oliver “trigger happy.”

Oliver was among two officers who responded to the house party in Balch Springs. He testified that while he was in the house, he heard gunshots outside, leading him to believe there was an active shooter. It was later determined that the shots were fired near a nursing home in the area.