The distraught family of NYPD Officer Brian Moore was preparing for the worst Sunday as his condition deteriorated from a bullet wound to the head that left him on life support.

Moore’s parents, including his retired-cop dad, Raymond, were joined by his police partner and dozens of other officers at Jamaica Hospital after he began bleeding uncontrollably and his blood pressure plummeted early Sunday, sources told The Post.

At one point, a police chaplain was called to the hospital after Moore, 25, underwent four hours of emergency surgery to repair the damage from a bullet that struck him in his forehead and exited the back of his neck, tearing his brain stem, sources said.

His older sister, Christine, cut short a trip out of town and was flying back home after learning of the dire situation, sources said.

The tragic development came as new details emerged about the shooting, which occurred after Moore and partner Erik Jansen spotted suspect Demetrius Blackwell fiddling with an object in his waistband on a Queens street around 6:15 p.m. Saturday.

“Do you have something in your waist?’’ Moore asked Blackwell while sitting behind the wheel of the cops’ unmarked car, sources said.

“Yeah, I got something,” Blackwell, 35, snarled back.

The ex-con, who has a long history of violence, whipped out a handgun and opened fire on the cops, sources said.

Blackwell fired three rounds, hitting Moore at least once. Jansen wasn’t hit.

“All I heard was shots and an officer screaming for his partner and saying, ‘Stay with me!’ ” recalled a woman who lives nearby in the same house as Blackwell.

Three eyewitnesses — including Jansen — identified Blackwell, leading to his capture about an hour and a half later at his home, according to sources.

Moore, 25, is the fifth NYPD cop to be shot in as many months.

Blackwell was charged Sunday with two counts of attempted first-degree murder of a police officer, along with related assault and weapons charges.

More than 100 cops crammed into a Queens courtroom for his afternoon arraignment.

“This was nothing more, nothing less than a coldblooded attempt at an assassination of New York’s Finest,” Queens Assistant District Attorney Peter McCormack said in court.

“These brave officers were doing what they do every day — putting their lives at risk,” he said.

“Without warning, and in the most brutal manner, the defendant wielded a gun, aimed and fired the gun at both officers.”

Blackwell told investigators after his arrest that his friends “call me Dee,” according to McCormack.

“They also call me ‘Hell-Raiser’ on the street,” Blackwell allegedly bragged.

Blackwell was picked out of a lineup by two witnesses and identified by a third from an array of photos, McCormack said.

Blackwell, who entered the courtroom wearing a hangdog expression and a tattered white plastic jumpsuit, kept his head bowed throughout the proceeding.

The heavily tattooed defendant didn’t speak in court. His lawyer, David Bart, pleaded not guilty on his behalf.

Bart said Blackwell has a wife and child and suggested that “because he was arrested in his home without a warrant, the arrest may be illegal.”

Queens Criminal Court Judge Michael Yavinsky ordered Blackwell held without bail pending another court appearance May 8.

Outside the courthouse, the head of the Patrolmen’s Benevolent Association mocked Blackwell as “a miscreant who prides himself on being called ‘Hell-Raiser.’ ”

“We’ll make sure he never raises hell on the streets of New York City ever again,” said union chief Patrick Lynch.

“Just remember, if you attack one police officer, you’ve attacked all of us,” he added.

An officer who works with Moore in Queens’ 105th Precinct called him “a great cop.”

“He always wanted to be a cop and follow his father in the family business, and he worked real hard to get into anti-crime,” the co-worker said.

Neighbor Don Crummy, whose son is also an NYPD cop, said Moore was so eager to join the force that he took and passed the entrance exam at age 17 but had to wait four years to get hired.

“He’s just a regular kid. He would come over and help me carry things when I needed help,” said Crummy, 51.

“He is just a good person.”

In an eerie coincidence, Moore lives with his father in Massapequa, LI, on the same street where NYPD cop Eddie Byrne lived before he was murdered in 1988 while guarding the home of a witness in a drug case.

Police have yet to recover the weapon used to shoot Moore, sources said.

On Sunday afternoon, cops used pitchforks and rakes to look for the gun in neighborhood shrubbery and muck that sanitation crews sucked out of storm drains.

Cops also used ladders to peer into roof gutters during the 45-minute search.

They said they are offering a $5,000 reward for information about the shooting.

Blackwell has nine prior arrests and has been in and out of the slammer over the past 20 years, sources said.

He served five years for attempted murder tied to a daylight July 2000 robbery during which he shot several bullets into a man’s car.

He got locked up for another 15 months in 2007 for violating his parole.

Blackwell’s other arrests include charges of robbery, assault, grand larceny and pot possession, records show.

The most recent NYPD fatalities were Officers Rafael Ramos and Wenjian Liu, who were slain in Brooklyn in December by a gunman who vowed that he was going to put “wings on pigs.”

Two other injured cops, Aliro Pellerano and Andrew Dossi, survived an attack that took place while they were investigating a Bronx deli holdup.

Additional reporting by C.J. Sullivan, Kathleen Culliton, Priscilla DeGregory, Philip Messing and Daniel Prendergast