A white former police officer said Thursday he thought a weapon was pointed at him when he shot and killed an unarmed black teenager outside Pittsburgh last summer.

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, arm and side of his face 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.

___

Associated Press writer Claudia Lauer in Philadelphia contributed to this story.