An NYPD officer who shot and killed an unarmed Bronx teenager in 2012 has quit the force after an internal disciplinary trial found him guilty and recommended he be fired, police said Sunday night.

Officer Richard Haste shot Ramarley Graham, 18, once in the chest at his home in February 2012. Graham had been the focus of an NYPD drug surveillance operation.

Haste had testified that he shouted for Graham to “show me your hands” multiple times, which he answered with profanities. The officer said he fired his gun when the teenager reached into his waistband because he thought Graham was trying to get a weapon.

Authorities found marijuana in the bathroom, but no gun.

Graham’s family received $3.9 million from the city in a civil case settlement in 2015. A state grand jury indicted Haste in June 2012; however, a prosecutorial error led to a case dismissal in May 2013. A second grand jury declined to indict the officer in August 2013, and federal authorities last March declined to prosecute.

On Friday, the NYPD trial commissioner found Haste guilty on all counts, the department said in a news release. On Sunday, Haste “decided to quit the NYPD upon being informed” of the trial commissioner’s verdict and the recommendation that his employment be terminated, the release said. NYPD Commissioner James P. O’Neill concurred with the findings, the release said.

Haste had been on desk duty, without his gun or badge, pending the internal disciplinary trial.

A police review board had earlier found that Haste’s tactics were flawed but the shooting had been justified.

Graham’s mother, Constance Malcolm, said in a statement Sunday night: “Richard Haste should have been in prison but instead of even firing him, the de Blasio administration let him resign . . . Every step of the way, the Mayor and NYPD have dragged their heels and have refused to hold officers accountable for murdering my son.”

De Blasio issued a statement Sunday night agreeing with the department trial commissioner’s recommendation to fire Haste, saying: “We are relentless in our efforts to ensure that lives will be saved as a result of the unspeakable loss of Ramarley Graham.”

Lawyers for Haste and Malcolm could not be reached Sunday night.

In closing arguments in the department trial in January, Haste’s attorney Stuart London had said Graham’s refusal to obey officers’ orders led to his death. NYPD attorney Nancy Slater described Haste as a reckless cowboy who disregarded sound police training, in her summation.

Slater put the blame for Graham’s death on Haste, who she characterized as “overzealous” in his attempt to make a gun arrest. In doing so, Slater said, Haste disregarded police protocol for handling a barricaded suspect: calling for backup from emergency service cops.

With Anthony M. DeStefano