The facts of a chaotic and violent domestic dispute are still being sorted out, but this much is certain: the two men who went to Kathy Russo’s apartment on Monday night ended up dying in a hail of police gunfire.

The New York Police Department was still investigating the fatal shootings on Thursday after the medical examiner determined that Rafael Laureano, an unarmed man who intervened in the dispute, died from a gunshot wound to the back following initial suspicions that he may have been stabbed.

“Laureano was inadvertently shot by a police bullet during a close-quarters attack on him,” NYPD spokesman Stephen Davis said.

According to an initial police report, the trouble began at about 7pm Monday when Francisco Carvajal showed up at the Brooklyn apartment. He left after Russo, his ex-girlfriend, wouldn’t let him in. Police said she then called Laureano for help.

Laureano was in the apartment when Carvajal returned armed with a knife and pushed his way inside, police said. As the two men struggled, Russo locked herself inside a bathroom with her seven-year-old son and six-year-old daughter, they said.

A sergeant and three police officers responding to a 911 call encountered Laureano in the hallway outside the apartment. Inside, Carvajal was using a knife to try to break into the bathroom as Russo screamed loud enough that officers could hear her from the hallway, police said.

Carvajal cut through the door, police said. Russo fought him off by cutting him with his own knife, they said.

When officers broke down the front door, Laureano “bolted into the apartment despite efforts by the sergeant to stop him”, Davis said. He ran into a back room, where Carvajal tried to assault him with the knife, he said.

Officers ordered Carvajal to drop the knife several times, police said. He instead turned and went at them, and they responded by firing at least 10 times, killing both men, police said.

An autopsy found that of the nine rounds that hit Carvajal, five stayed in his body and four exited, while another grazed him. It was unclear whether the bullet that killed Laureano was a direct shot or one that also hit Carvajal, police said.