An NYPD police officer who was shot in the head by an ex-con on Saturday evening in Queens has died.

Speaking outside of Jamaica Hospital shortly before 3 p.m., Police Commissioner Bill Bratton said New Yorkers should pray for Officer Brian Moore’s family, who made the difficult decision to remove him from life support.

Bratton said officers from the 105 Precinct had just come back from the funeral of a fellow officer, who died from complications related to 9/11, when they heard that Moore had died.

“He was an extraordinary young man … (this is a great loss) to his family, this department, and to this profession and this city,” Bratton said.

Patrolmen’s Benevolent Association President Pat Lynch said that officers throughout the city will ride subways and do patrols with a heavy heart, and asked New Yorkers to comfort cops and thank them for their service.

“There is no closure for a New York police officer’s family in death,” Lynch said. Moore’s father and uncle are retired from the NYPD, and he has a cousin on the force.  

Moore had 150 arrests in his less than five year career, officials said.

Moore was allegedly shot by Demetrius Blackwell around 6:15 p.m. on Saturday. Moore and his partner, Officer Erik Jansen were on patrol in plain clothes and an unmarked police car when they spotted Blackwell suspiciously adjust something in the waistband of his pants in the area of 212 Street and 104 Avenue.

When the officers pulled up behind Blackwell and asked what he was doing, the suspect allegedly pulled out a gun and fired multiple times into the car.

Moore was hit several times in the head, authorities said, and Blackwell fled before the officers were able to return fire. Moore’s partner was not injured and the suspect, who is 35 years old, was apprehended about 90 minutes after the incident.

Blackwell was arraigned on attempted murder charges on Sunday, and he appeared in a courtroom packed with police officers in a torn white jumpsuit with his hands cuffed and legs shackled. Queens DA Richard Brown upgraded the charge to murder on Monday afternoon, and if convicted Blackwell faces life in prison without the possibility of parole.

Police recovered a Taurus revolver with three spent bullets and two live rounds forma  backyard on 104 Avenue on Monday. Cheif of Detectives Robert Boyce said the gun was one of 23 guns reported stolen from a bait and tackle shop in Georgia in 2011. Since then, nine of those guns have been recovered in New York City, Boyce said. 

Bratton said the DA plans to start the grand jury process on Tuesday and seek a charge of first-degree murder of a police officer. 

Blackwell returns to court on May 8. He has a criminal history that includes charges of criminal possession of a weapon and robbery. He previously served eight years in prison on an attempted murder charge, the Daily News reported.

Moore’s funeral will likely be planned for later this week. Officers lined up and saluted Moore’s body as it left the hospital in an ambulance, with Bratton placing a hand over his heart.

The flags at 1 Police Plaza were lowered to half staff following Moore’s death, and a blue ribbon was draped around a tree outside the 105 Precinct.

“Our city is in mourning and our hearts are heavy … we lost one of the best amongst us,” Mayor Bill de Blasio said. “We need to be there for the Moore family and thankful there was a hero amongst us, known as Brian Moore.”

Gov. Andrew Cuomo called the shooting a “deplorable act of violence that has robbed New York of one of its finest.”

In December, Officers Wenjian Liu and Rafael Ramos were shot and killed as they sat in the back of their patrol car in Brooklyn.