NEW YORK – The police officer who accidentally killed a Long Island college student along with an armed intruder faced perhaps the most harrowing decision of a law enforcement career: choosing the split-second moment when the risk is so high that you must act to save a life.

“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?” said Michele Galietta, a professor of psychology at the John Jay College of Criminal Justice. “That’s what makes the job of an officer amazingly difficult.”

She spoke Sunday as Hofstra University students honored 21-year-old Andrea Rebello by wearing white ribbons at their graduation ceremony.

Rebello was killed two days earlier after a masked man walked through the unlocked door of her off-campus home. A police officer aiming at the would-be robber opened fire, hitting the Hofstra junior as well as the ex-convict holding her in a headlock.

On Saturday evening, flags on the Hempstead campus were at half-staff and students held a silent outdoor vigil in front of a photo of the young woman. Surrounded by candles and flowers, they sang “Ave Maria.”

Her life ended in the seconds that forced the veteran police officer to make a fatal decision, but the questions surrounding the student’s death are just beginning, along with an internal investigation by the Nassau County Police Department.