A man has been charged in connection with the fatal stabbing of a 20-year-old man in Park Slope after the victim was involved in a threesome gone wrong, according to the NYPD and a law enforcement source.

Christopher Membreno, 24, of Brooklyn, was charged on Tuesday with murder and criminal possession of a weapon following the death of Manos Ikonomidis early Monday morning, police said.

Ikonomidis, also of Brooklyn, was attacked at about 4 a.m. after he tried to leave the apartment on 16th Street and Seventh Avenue, sources said.

Ikonomidis, his 21-year-old friend, and a woman were together earlier that night when one of the men may have tried to film the encounter, a source said. The woman then asked to leave and the other man drove her to Staten Island. Ikonomidis stayed behind.

When the friend came back to the apartment, Ikonomidis decided to leave. But that’s when Membreno and two other men arrived in the lobby, beat him and stabbed him to death, the source said.

Ikonomidis was able to stumble to a neighbor’s door and knock before collapsing. He was taken to NewYork-Presbyterian Brooklyn Methodist Hospital where he was pronounced dead.

Investigators said they believe the woman may have called the three men before the attack. But so far, no charges have been filed against her.

Police said the investigation into the deadly attack is ongoing and the two other men with Membreno have not been caught.