A love triangle between three correction officers turned deadly early Friday when a jilted boyfriend was shot outside a Queens home by his estranged girlfriend’s new beau, police and correction sources said.

Retired correction officer Jeffrey Ragland, 50, was wounded in the chest as he and the other man fought around 4:30 a..m. on 108th Avenue near 227th Street in Queens Village, a police source said.

Ragland was rushed to Long Island Jewish Medical Center, where he was pronounced dead.

The spurned boyfriend had been lying in wait outside the address where his ex, Salees Sales, 33, had spent the night with a younger man, 36-year-old Oniel Linton, police said.

The former lovers argued — and Linton intervened, he told investigators, because the encounter turned violent, with Ragland punching Sales, according to a police source.

The two men then struggled. According to Linton, he drew his weapon and fired twice, striking the other man once in the chest, after Ragland seemed to be reaching for a gun, police said.

“I heard two shots,” said Lauristine Finch, a 72-year-old retired nurse who was jolted from her sleep. “I heard pop, then ten seconds later I heard another pop again. I knew it wasn’t firecrackers. They were too loud and too strong. I knew they were shots right away.”

Ragland had parked his silver SUV directly behind Sales’ car on 108th Avenue, where she was spending the night at Linton’s home, police said.

The new couple had come outside and were headed to work in separate cars, sources said. As Sales approached her car, Ragland got out of his vehicle and an argument erupted, police said.

Seconds later, Linton drove up in his vehicle.

“He sees them arguing, and he saw [Ragland] punching and slapping her, so he got out of his car,’’ a police source said.

Linton pushed Ragland to the ground, and that’s when Ragland reached for a gun, prompting Linton to draw and fire, the source said.

Another neighbor said she heard a shot, “and then I heard a woman scream,” she said.

The neighbor, who declined to be identified, said another shot followed the scream. “It wasn’t a long pause between the two shots,” she said.

She described the Queens Village block where she’s lived for 14 years as quiet. “Nothing like this has ever happened before,” she said.

Linton and Sales went to a police precinct to be interviewed by investigators and were still there as of Friday afternoon, a source said.

Near Ragland’s home on 155th Street, most neighbors refused to talk to a reporter, but one said the victim “was a good guy.” A correction officer who said he knew Ragland called him “a big dude” — over 6 feet tall and 300 pounds — and a straight arrow.

“I’m shocked,” said the correction officer, who declined to be identified. “I can’t believe it.. . . I can’t see him getting caught up in something like this. He wasn’t the type to be running around, causing trouble. This is sad.”