An 8-year-old boy was killed, two adults stabbed and their attacker was shot dead by police while holding knife to his father’s neck in a Jamaica apartment on Thursday.

Now the NYPD is trying to piece together just what sparked a suspected domestic dispute that went horribly wrong.

Speaking at a press conference Thursday evening outside 147-25 94 Ave., NYPD Chief of Patrol John Chell said police were summoned at about 5:20 p.m.

Police as of Friday afternoon still had not released any names of those involved. Published reports state that the assailant was 20 years old.

“It was just a tragic and horrific event that happened here this evening,” Chell said. “A woman, 29 years old, was stabbed. A father, 43 years old, also was stabbed. And an 8-year-old boy lost his life.

“Just a reminder that being a New York city police officer, what they have to walk into and the decisions they have to make quickly. And by making those decisions, they saved two lives tonight — including the father and an 8-month-old baby who were still in that apartment.”

Chell said the first sign of trouble was at about 5:20 p.m. when a woman ran outside of the building as she was bleeding and pleading for help. She ran up the street toward the Long Island Rail Road’s Jamaica  station to seek help from Metropolitan Transportation Authority police officers.

Personnel at the apartment building’s front desk simultaneously called 911. Chell said uniformed officers from the 103rd Precinct arrived in under three minutes. He said they spoke to a witness before heading to the fifth-floor apartment.

Chell said he viewed body camera footage of the incident, though he did not say if it came from one or both officers who entered the apartment.

“It was an extremely small apartment,” he said. “What they were confronted with was the perpetrator holding his father in  headlock with a knife to his throat.

“They gave repeated commands in both English and Spanish to drop the knife. He did not. One officer fired one round, striking the target, saving that man’s life.”

Chell said the officers rendered immediate first aid before the man was taken to an area hospital. The baby, a little girl, was not hurt. The chief reiterated that officers gave at least four separate orders to drop the knife.

‘‘They had to use their weapons to save this man’s life and that is what they did,” he said.

During a brief question-and-answer session, Chell said the case is being handled by the Detective Bureau and the Force Investigation unit. He said the boy who was stabbed to death and the man shot by police could be either brothers of half-brothers.

“We don’t know how this occurred," he said. “Obviously, it was a domestic dispute. Unknown what was in that domestic dispute.”

NYPD Deputy Chief of Operations Kaz Daughtry said he and Chell had just returned from visiting the two officers involved at North Shore University Hospital in Manhasset.

“We walked in just as the were being informed that the 8-year-old boy had passed away,” Daughtry said. “To see the emotional trauma on those officers’ faces. One said they wish they arrived little sooner to save this young life.”