Two people are dead and an off-duty police officer is injured after a shooting Friday morning in Queens, the NYPD said.

A man shot and killed a woman who is believed to be his ex-girlfriend and wounded the woman’s new boyfriend before turning the gun on himself inside a 77th Street apartment in East Elmhurst, police said.

A 911 call led police to the residence, where the bodies of Regan Smith, 31, of Queens, and Nelson Giron, 47, of Lakeworth, Florida, were recovered about 7 a.m. The second man, identified as a 43-year-old off-duty Yonkers police officer, was found with a gunshot wound to the shoulder and what was believed to be two stab wounds, police said. He was transported to Elmhurst Hospital Center and underwent immediate treatment.

Chief of Detectives Dermot F. Shea said that it was believed all three had at one point served in the military.

The initial 911 call came from a woman who stated to the emergency operator, “I’ve been shot by my boyfriend” before disconnecting the line, Shea said. When police arrived at the scene, they heard about 10 total shots fired, he added.

A preliminary investigation found the woman suffered a gunshot wound to the head. The suspected shooter died from what appeared to be a self-inflicted gunshot wound, police said. One firearm was recovered from the scene near his body, Shea said.

Police believe the female victim and the injured male were currently romantically involved.

“On Monday, we had several calls to this general vicinity. We had an incident involving a car being keyed, and it involved the three individuals,” Shea said.