The NYPD officer who shot and killed 18-year-old Ramarley Graham nearly five years ago testified Friday that he believed he used proper police tactics during the incident and was justified in firing the single shot that took the teenager’s life.

During testimony at his departmental trial, Richard Haste said he thought Graham, the object of a police drug surveillance operation, had a gun and was about to use it when the officer decided to fire at the teen in his Bronx apartment the afternoon of Feb. 2, 2012.

“I expected to be dead,” Haste said, under questioning by his attorney Stuart London about the moment he confronted Graham in the second-floor apartment on East 229th Street.

“I am dead, there is no way I am making it out of here,” said Haste, who repeatedly stated that he and his fellow officers thought Graham was armed.

Other cops had radioed that they were certain they had earlier seen Graham on the street with a gun in his waistband, although no gun was found.

NYPD officials are seeking to have Haste fired for what they said was his “poor tactical judgment” during the incident. Deputy Commissioner for Trials Rosemarie Maldonado will make a recommendation on Haste’s fate to Police Commissioner James O’Neill, who will make the ultimate decision.

advertisement | advertise on newsday

As chief of department in 2015, O’Neill had found the shooting of Graham to be within department guidelines even though some of the tactics used by the drug enforcement team were improper.

In his testimony, Haste stuck mainly to the narrative of events leading up to the shooting as expressed by other department and defense witnesses, despite efforts by NYPD attorney Beth Douglass to shake his recollection. He shot Graham in a bathroom.

Further questioned by London, Haste appeared to express regret about the shooting, though he thought he had done the right thing by firing at Graham during the quickly unfolding episode. Haste was stunned to learn about five days after the incident that Graham had no weapon.

“I was in absolute disbelief,” Haste said. “My first instinct was to ask ‘where did it go?’ ”

In the five years since he shot Graham, Haste said he wondered whether he could have done anything differently, but still believed he was “justified in what I did.”

“I don’t know of any cop who goes out to [fire] a gun,” Haste said.

Although Haste’s testimony was largely unemotional, he at times angered members of Graham’s family in the courtroom, particularly when he said the teen first addressed him with profanities when Graham was asked to show his hands to the officer.

“Objection!” blurted out one member of the family, prompting Maldonado to pound her gavel.

advertisement | advertise on newsday

Closing arguments are scheduled for Monday. A final recommendation by Maldonado is expected in about three months.