With the dead 18-year-old’s mother and grandmother looking on, NYPD prosecutor Beth Douglas said Officer Richard Haste shouldn’t have even busted through the door of the apartment to continue chasing Graham, much less shot at the teen as he tried to flush some pot down the toilet.

“The tragic death of Ramarley Graham could have and should have been avoided,’’ Douglas said.

Douglas said an NYPD Emergency Services or SWAT unit should have at least been called in to ensure a “slow approach to protect police safety and preserve human life.’’

But Haste’s lawyer, Stuart London, insisted, “This is not a bunch of cowboy officers looking to violate the rights of civilians.”

The lawyer called his client “a hero’’ for trying to take what he thought was a loaded weapon off the street and suggested that “police work should not be subject to question.

Haste was part of a narcotics unit that believed Graham had a gun because he adjusted his waistband when they approached him in the street that day, police have said.

The teen had just been in a bodega that was a known drug spot nicknamed “the ice box,” authorities said.

When cops tried to stop Graham, the teen sprinted for his mom’s nearby apartment. Haste and the officers barged into the home after him with their guns drawn.

Haste confronted Graham in a bathroom as the teen was flushing his marijuana, authorities have said. Haste claimed that the teen made a move toward his waistband and that’s when he shot him once in front of his brother and grandmother.

No gun was ever recovered.

The Bronx DA’s Office had charged Haste with manslaughter, and a grand jury indicted him on the rap.

Protesters stand outside 1 Police PlazaNatan Dvir

But a judge later tossed the indictment, saying a prosecutor had wrongly instructed the panel to disregard whether other cops had told Haste that the teen was armed.

Another grand jury heard the case and declined to indict Haste.

Haste is now facing departmental charges and could be fired, which is what Graham’s family wants.

“I don’t think you want him in your community, so would you want him on the job?” Graham’s mother, Constance Malcolm, said Tuesday outside the courtroom.