The NYPD rookie cop accused of manslaughter in the 2014 shooting of an unarmed man in an East New York public housing stairwell choked back tears during gripping testimony Monday as he told jurors in Supreme Court in Brooklyn that his gun fired by accident and he panicked afterward.

Officer Peter Liang said he had a flashlight in one hand and drew his gun with the other as he entered a dark stairwell at the Louis Pink Houses because he sensed possible danger, but did not put his finger on the trigger and pointed the gun down. When he stepped onto the eighth-floor landing, he said, he heard something.

“It was a quick sound. It startled me,” Liang testified. “The gun just went off when I tensed up.”

The shot ricocheted and fatally wounded Akai Gurley, 28, on a fifth-floor landing, but Liang said he heard nothing and didn’t realize anyone was hurt. He stepped back into the hall, told his partner he would probably get fired for the unauthorized discharge, and discussed calling it in.

Only when he re-entered the stairwell to look for the bullet, Liang testified, did he hear someone crying below and find Gurley’s girlfriend crouched over his body. He immediately knew it must have been his bullet, Liang said, reacting with “shock” and “disbelief” and thinking, “Oh my God, I’ve shot someone!”

At that point in his testimony, Liang turned his back to the courtroom and began sobbing. He was unable to continue, and the judge let him leave the courtroom to compose himself. He returned to the courtroom after 60 seconds, but had to turn away two other times to wipe at his face with a white tissue.

Liang, 28, is charged with manslaughter and criminally negligent homicide for the shooting, and official misconduct for failure to aid Gurley after he was shot. The case heightened tensions over police shootings in 2014, but the wounding of two officers last week during a stairwell patrol highlighted the dangers.

advertisement | advertise on newsday

Prosecutors contend Liang was reckless in taking out his gun in the first place without a specific threat. He didn’t explicitly admit pulling the trigger Monday and prosecutors did not press him on the point, but did get him to acknowledge a section of his training manual saying shootings rarely “just happen” by accident.

As much as the shooting, Liang has been criticized for failing to help Gurley’s girlfriend try to keep him alive — the focus of the official misconduct charge. He testified that he received CPR training at the police academy, but he never worked on a mannequin and instructors gave recruits most of the answers on tests.

Gurley, Liang testified, looked like he wasn’t going to make it — “His eyes were rolled back. He was just laying there very still.” — and he felt that using his radio to get “professional medical help” was the best way he could aid Gurley.

He said he asked for the address of the building, but was overwhelmed, and eventually went down to the fourth Floor, where a neighbor was calling 911, to ask for the address and use his radio. “I was just panicking so much, I couldn’t process it in my head,” he said.

Liang appeared genuine and remorseful during his testimony, but during a brief news conference afterward Gurley’s family and supporters said they were unimpressed. Gurley’s mother Sylvia Palmer called the officer’s testimony “horrible.”

Get the Newsday Now newsletter!

The best of Newsday every day in your inbox.

“Peter Liang walked away and left Akai to die in his own blood,” she said. “Police Officer Peter Liang said that it was an accident, an accidental death. Peter Liang, my son’s death was no accident. You murdered my son. I need justice for my son.”

Liang has been on administrative duty at the NYPD since the shooting. The defense and prosecution both rested their cases after his testimony, and closing arguments are scheduled for Tuesday.