The family of Andrea Rebello, the Hofstra University student killed Friday following a home invasion and shootout between the suspect and responding Nassau County police officers, had their grief compounded when they learned the 21-year-old public relations major was killed by an officer’s bullet.

The officer, whose name was not released, is on sick leave. He fired eight bullets, with seven striking suspect Dalton Smith and the other fatally hitting Rebello. He fired when Smith, who had Rebello in a headlock and threatened to shoot her, aimed his gun at officers.

Could Rebello’s death have been prevented? Did the officer make the correct decision? Experts knowledgeable about such situations say the cop was in a tough situation involving making choices in less than a second.

"The big question is, how do you know, when someone's pointing a gun at you, whether you should keep talking to them, or shoot?" Michele Galietta, a professor of psychology at the John Jay College of Criminal Justice who helps train police officers, told the Associated Press. "That's what makes the job of an officer amazingly difficult."

The circumstances of the shooting remain under investigation. But what is clear is that Smith, wearing a ski mask and armed with a gun, pushed his way into the off-campus house shared by Rebello, her twin sister and two friends early Friday morning in Uniondale, N.Y. Authorities are also investigating the possibility that drugs were involved, WPIX reported.

Rebello’s twin, Jessica Rebello, was allowed to leave the house so she could withdraw money for Smith. Despite being told that her housemates would be killed if she called the cops and didn’t return within minutes, Jessica Rebello phoned 911, and officers responded to the scene.

Shots were then fired, and Andrea Rebello and Smith were killed.

Galietta said the officer’s decision to fire indicated that he believed his life and Andrea Rebello's were in danger.

"What we're asking the cop to anticipate is, 'What is going on in the suspect's mind at the moment?'" she said. "We're always trying to de-escalate, to contain a situation, but the issue of safety comes in first, and that's the evaluation the officer has to make."

Eugene O’Donnell, a former New York City police officer and professor of law and police studies at John Jay, said whether or not the Nassau police viewed the incident as a hostage situation is important. There are strategies designed to cool off such a situation, he said, but Smith's looking into the officers’ eyes while pointing a gun at them may have complicated matters.

"It may have been too fluid ... for the officers to do anything else," he told the AP. "It underscores that there's no two of these that are exactly alike."

Andrea Rebello’s funeral is scheduled for Wednesday in Sleepy Hollow, N.Y., near her hometown of Tarrytown, in Westchester County.