NYPD Officer Peter Liang was convicted of manslaughter Thursday night in the 2014 stairwell shooting death of Akai Gurley.

A jury in State Supreme Court in Brooklyn in its third day of deliberations also found Liang, a rookie officer, guilty of official misconduct. Liang faces 5 to 15 years for the top count of manslaughter and up to a year for official misconduct when he is sentenced on April 14.

After the verdict was read, Liang buried his face in his hands. Gurley’s mother and stepfather embraced in the first row.

Liang left the courtroom shortly afterward.

The killing of Gurley, 28, who was unarmed, in the stairwell of the Louis Pink Houses in East New York with his girlfriend, inflamed police critics.

Brooklyn District Attorney Ken Thompson said the verdict “in no way is a conviction of the New York City Police Department, which is the finest police department in the world. But we stood together today because we had to affirm that no matter where you live, in Brooklyn your life matters. Your life matters in all parts of this borough — even in the Pink Houses.”

Liang testified that he unholstered his gun when he entered the darkened stairwell and fired by accident when he heard a sound and flinched, hitting Gurley in the stairwell below.

Prosecutors said he recklessly took the gun out without a specific threat and fired intentionally in the direction of the sound.

Liang was also charged with official misconduct for failing to give CPR to Gurley after the shooting.

The case heightened tensions over police shootings in 2014, but the wounding of two officers last week during a stairwell patrol highlighted the dangers.

Liang didn’t explicitly admit pulling the trigger when he testified on Monday, and prosecutors did not press him on the point. But they did get him to acknowledge a section of his training manual saying shootings rarely “just happen” by accident.

As much as for 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 he received CPR training at the police academy but never worked on a mannequin and that instructors gave recruits most of the answers on tests.

PBA president Patrick J. Lynch said: “We are very disappointed in the verdict and believe that the jury came to an absolutely wrong decision. This was a terrible and tragic accident and not a crime. This bad verdict will have a chilling effect on police officers across the city because it criminalizes a tragic accident.”

Robert Brown, Liang’s defense attorney, said he will file a motion to set aside the verdict and, if that fails, he intends to appeal the jury’s decision.

“I can’t imagine that the jury came up with a reckless manslaughter conviction on this case,” Brown said. “Anyone that sat in the courtroom would find it very hard to believe that he engaged in conduct that created a substantial risk.

“The bullet was clearly a ricochet shot. ... You had a police officer that was going onto a roof landing in a public-housing project addressing shootings in the pitch black. If a police officer can’t take his gun out at that point in time, then we’re making a very difficult job even more difficult for our police officers.”

Said Mayor Bill de Blasio Thursday night: “The death of Akai Gurley was a tragedy. The jury has now spoken, and we respect its decision. We hope today’s outcome brings some closure to the Gurley family after this painful event.”

On Monday, Liang testified he had a flashlight in one hand and drew his gun with the other as he entered a dark stairwell because he sensed possible danger. Liang testified that he 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 Gurley 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 found 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!”

(With Newsday)