BILLINGS, Mont. (AP) – Authorities are considering whether to bring criminal charges against a Montana 17-year-old who fired a bullet through his bedroom window, killing his friend in a case that an investigator described as an accident.

The unidentified suspect had been startled when 15-year-old Mackeon Schulte and another friend knocked on his window early Sunday, Billings Police Capt. John Bedford said.

The alarmed teen grabbed a revolver described as a family heirloom and shot through the glass, striking Schulte in the head, Bedford said.

Police are investigating the shooting as a homicide but it will be up to prosecutors to decide on charges. Bedford said the suspect was not considered a danger, and criminal charges could run the risk of “compounding a horrible situation.”

“We’re not going to rush to judgment,” Bedford said. “There’s enough damage that’s already been done.”

Prosecutors are planning a lengthy review, Yellowstone County Attorney Scott Twito said.

The victim’s family could not be reached for comment.

Montana law recognizes three types of homicide – deliberate, mitigated and negligent – and all three will likely be on the table for prosecutors, said Andrew King-Ries, associate dean at the University of Montana School of Law.

Deliberate homicide, or murder, comes into a play when someone knowingly causes another person’s death, King-Ries said.

Mitigated homicide, equivalent to voluntary manslaughter, is when a person kills someone while under some kind of mental or emotional distress. Negligent homicide applies when a person should be aware that their actions could cause a death but chooses to disregard that risk.

“When you shoot a gun, you’re probably aware there’s a risk,” King-Ries said. “If you can establish negligence, it’s not an accident.”

But he added that prosecutors have broad latitude on whether to file charges and can consider the wishes of the victim’s family.

Prosecutors also must take into account whether a defendant can claim a killing was justified under Montana’s “castle doctrine” of self-defense.

That ploy was used unsuccessfully last year in another high-profile Montana shooting, in which a Missoula homeowner shot and killed a German exchange student in the homeowner’s garage.

Attorneys for defendant Markus Kaarma asserted the shooting was justified under the castle doctrine. Jurors rejected the argument, and Kaarma was sentenced to 70 years in state prison on a charge of deliberate homicide.

Both the victim and the suspect in the Billings case went to Senior High School, located just a block from the shooting scene. Outside the school on Tuesday, several of their classmates described Schulte and the suspect as good friends who had no known ill feelings toward each other.

Freshman Betty Mitchell said the two were “close as hell.” She said the suspect’s house was previously broken into and he was probably scared when he heard noises outside his window Sunday night.

Neighbors said the suspect and his family had lived in the single-story house where the shooting took place for many years.

The house was badly damaged in a fire last August, forcing the family to live elsewhere until they recently moved back in, according to neighbors and authorities.

The suspect was described as friendly youth who was willing to help others on the street shovel their walks in the winter.

“He’s a great kid, and it’s a really nice family,” said next-door-neighbor Emily Duncan. “We’re just sad they’re going through this.”

(Copyright 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)