A white former police officer charged with killing an unarmed black teenager outside Pittsburgh took the stand in his own homicide trial Thursday afternoon.

*This story was updated at 7:06 p.m.

Former East Pittsburgh Police Officer Michael Rosfeld took the stand at his homicide trial and insisted he was in fear for his life when he gunned down 17-year-old Antwon Rose II.

Rosfeld, 30, got choked up and dabbed away tears as he recounted finding the mortally wounded Rose on the ground.

"I was upset, shocked," Rosfeld said. "He was moaning, trying to breathe."

The former officer testified after the prosecution rested its case earlier Thursday. Prosecutors said Rosfeld gave inconsistent statements about the shooting, including whether he thought Rose had a gun.

A prosecution witness has said that after the shooting, he heard Rosfeld say repeatedly, "I don't know why I shot him. I don't know why I fired." But another prosecution witness said he heard the officer ask, "Why did he do that? Why did he take that out of his pocket?"

Rosfeld fired three bullets into Rose after pulling over an unlicensed taxi he suspected — correctly, as it turned out — to have been involved in a drive-by shooting. Rose, a passenger in the car, was shot in the back as he fled.

Rosfeld followed proper procedure that day, according to defense witness Clifford W. Jobe Jr., a retired state trooper and use-of-force expert.

"I can't fault Officer Rosfeld," said Jobe, calling the officer's actions "textbook."

The trial will resume Friday with Jobe back on the stand for cross-examination.

Rosfeld testified the car that Rose was riding in had its rear windshield shot out. He chirped his siren and turned on his police lights, and the driver complied and pulled over. Rosfeld said he got out of his car with his gun drawn and ordered the driver to the ground.

That's when he said Rose and another occupant, Zaijuan Hester, "jumped out" of the car.

Demonstrating for the jury what threatening gesture he believed he saw, Rosfeld stood up, raised his right arm to shoulder length and fully extended it as if pointing a weapon.

"It happened very quickly," Rosfeld said. "My intent was to end the threat that was made against me. I just wanted to end the threat to me. I followed the threat and fired. I just saw that person moving, so I assumed the threat was still there."

Asked by his attorney, Patrick Thomassey, why he fired his gun and did not simply let the suspects get away, Rosfeld said: "Because I thought one of them was pointing a weapon at me. They were dangerous felon suspects. They had just fired a gun at someone."

Rose had been riding in the front seat of the cab when Hester, in the backseat, rolled down a window and shot at two men on the street, hitting one in the abdomen.

Hester, 18, pleaded guilty last week to aggravated assault and firearms violations. Hester told a judge that he, not Rose, did the shooting.

Earlier Thursday, Judge Alexander Bicket rejected a defense motion to acquit Rosfeld on the murder counts he faces.

Prosecutors charged Rosfeld with an open count of homicide, meaning the jury can convict Rosfeld of murder or manslaughter. The defense argued a murder charge wasn't appropriate in the case.

"What we have is a police officer doing his duty. There's not a hardness of heart required for first- or third-degree murder," Thomassey argued in court. "We have a burst of three shots in one second on a fleeing felon and we're going to charge him with murder? It's not fair."

Prosecutor Daniel Fitzsimmons said the fact that Rosfeld shot a fleeing Rose in the back was evidence of malice, and the judge ruled the murder counts would stand.

Rosfeld's decision to testify wasn't unusual. At least three other white officers charged in the on-duty fatal shootings of black people have taken the witness stand in recent years.

In October, a Chicago jury convicted former officer Jason Van Dyke of murder in the shooting death of teenager Laquan McDonald. After the trial, jurors said Van Dyke's testimony hurt his defense. Van Dyke got fewer than seven years in prison.

An officer in Balch Spring, Texas, was convicted of murder last August and sentenced to 15 years after a jury didn't buy his explanation that he was trying to protect his partner when he fired into a car full of black teenagers, striking a 15-year-old.

And in 2017, a former South Carolina patrolman was sentenced to 20 years in prison for killing an unarmed motorist. The officer pleaded guilty to federal civil rights charges following a state trial at which he testified and the jury deadlocked.

Claudia Lauer in Philadelphia contributed to this report.

1:45 p.m.

Former East Pittsburgh Police Officer Michael Rosfeld shot and killed 17-year-old Antwon Rose after pulling over a car suspected to have been involved in a drive-by shooting minutes earlier. Rose was shot in the back as he fled.

Testifying this afternoon, Rosfeld said he thought Rose had been armed.

"One of the suspects turned, pointed towards me what I thought was a handgun," Rosfeld said. "We're trained to fire until the threat is elminated. ... I did it to protect myself and the community."

Rosfeld appeared to be holding back tears as he recounted Rose's struggle to breathe after being shot. "I was upset, shocked," he said.

Separately, Judge Alexander Bicket rejected a defense motion to acquit Rosfeld on the murder counts he faces.

Prosecutors charged Rosfeld with an open count of homicide, meaning the jury can convict Rosfeld of murder or manslaughter. The defense argued a murder charge wasn't appropriate in the case.

"What we have is a police officer doing his duty. There's not a hardness of heart required for first- or third-degree murder," defense lawyer Patrick Thomassey argued in court. "We have a burst of three shots in one second on a fleeing felon and we're going to charge him with murder? It's not fair."

Prosecutor Daniel Fitzsimmons said the fact that Rosfeld shot a fleeing Rose in the back was evidence of malice, and the judge ruled the murder counts would stand.

Prosecutors ended their case by calling three expert witnesses to the stand, including a firearms analyst who matched one of the bullets recovered from Rose's body to Rosfeld's gun — a formality since it's not in dispute that Rosfeld fired the fatal shots.

Raymond Everett of the Allegheny County medical examiner's office also told jurors that two guns with extended magazines were recovered from the car.

Rose had been riding in the front seat of the unlicensed taxi when Zaijuan Hester, in the backseat, rolled down a window and shot at two men on the street. Rosfeld pulled the car over minutes later.

Hester pleaded guilty Friday to aggravated assault and firearms violations for the shooting, which wounded a man in the abdomen. The 18-year-old told a judge that he, not Rose, did the shooting.

A neighbor shot video of Rosfeld's fatal encounter with Rose that was played for the jury. The video was posted online after the shooting, triggering protests in the Pittsburgh area last year.