A hero NYPD officer was fatally shot early Sunday during a desperate, hand-to-hand struggle with an armed suspect just after midnight on the grounds of the Edenwald Houses in The Bronx.

Officer Brian Mulkeen, 33, a six-year veteran of the department, did not survive three gunshot injuries, Chief of Department Terence Monahan told reporters at Jacobi Hospital, where doctors had worked to save his life.

Sources said Mulkeen had been shot in the head, chest and legs as he and the suspect wrestled on the ground.

The suspect, too, was fatally shot. “Five officers at the location fired their service weapons, striking the man,” Monahan said.

The fallen officer’s last words, recorded by his body-camera as he wrestled on the ground with the suspect, were “He’s reaching for it! He’s reaching for it!” Monahan told reporters.

Moments later, “numerous shots” were fired, he said.

“Officer Mulkeen’s gun fired five times,” Monahan said. “At this point, it is not clear who fired Officer Mulkeen’s gun.”

The suspect’s gun, a 32 caliber revolver, did not appear to have been fired, he said.

“As cops we know how rewarding our profession can be,” the chief added, his sadness apparent in his voice.

“But I’ll tell you: There is absolutely no worse moment on our job than this. As we stand here this morning, a young man with a bright future who courageously patrolled some of New York City’s toughest streets has tragically lost his life.”

The deadly encounter happened just after 12:30 a.m., as Mulkeen and two fellow plainclothes officers with the Bronx Borough Anti-Crime Unit, which is based in the nearby 47th Precinct, hopped out of their vehicle to speak with the suspected gang member, Monahan said.

“They were there because of gang activity that included recent shootings,” Monahan said.

The suspect, whose name was not released early Sunday, broke into a run, Monahan said.

It was Mulkeen — who lived in Yorktown Heights with his girlfriend, also a cop in The Bronx, with the 44th Precinct — who caught up with the suspect and tackled him first.

It was unclear at what point it had become apparent that the suspect was armed.

“He had a 32 cal revolver. He was seen reaching for his gun,” Monahan said.

“Officer Mulkeen was on the ground wrestling with the suspect for an extended period of time,” before the gunfire erupted, Monahan said.

The 27-year-old gunman was on probation until 2022 for a narcotics-related arrest from last year, the chief said, and had a burglary conviction from Rockland County. He was pronounced dead at the scene.

Mulkeen “was a great cop,” the chief added. “Just last night he arrested a man for possession of a gun in this very same precinct.”

Mayor de Blasio joined Monahan and PBA President Pat Lynch in asking all of New York to pray for Mulkeen’s heartbroken family — and his grieving NYPD family.

“This is a very, very sad day for our city,” Mayor de Blasio said at the press conference.

“We lost a hero this evening … This is a young man who made a choice to join the NYPD and put his life on the line.”

Mulkeen’s mother and father, sister and girlfriend had rushed to Jacobi hospital, the mayor said.

“We broke the news to them and one of the things they told us, even though their grief, was that Brian made a choice. He wanted to leave civilian life … he wanted to protect our city … he gave his life for all of us.”

A shaken Lynch called the suspect, “This soulless individual,” and lamented of the family, “Their hero — our hero — is not coming home.”

Earlier Sunday, police radio transmissions had recorded the worried panic of officers at the scene.

“Shots fired shots fired shots fired guys! I need a bus! I need a bus!” a male officer shouted, using police jargon for an ambulance.

“Laconia and 229!” another shouted of the shooting location.

“There was a cop lying on the floor and another guy who looked like he’d been shot in the eye,” witness Sara Diaz, 56, told The Post. “Oh my god, I got so nervous.”