Police were still trying to determine what prompted a 74-year-old Michigan woman to shoot her 17-year-old grandson, as dozens of his classmates and relatives gathered Tuesday for the boy's funeral

Police say Jonathan Hoffman was shot at least five times with a .40-caliber handgun in the suburban Detroit condo he shared with his maternal grandparents.

His grandmother, Sandra Layne, has been charged with murder. Her attorneys say she shot the teen because she was afraid. They have not said what caused her fear.

However, the senior at Farmington Central High School had at least two run-ins with police. Court records show Hoffman was pulled over March 17 in nearby Farmington Hills and ticketed for possession of marijuana and drug paraphernalia. He later received a 93-day, suspended sentence and was placed on 12 months' probation.

On March 21, West Bloomfield Township officers responded to complaints outside Layne's condo.

"I'm not sure who called. It might have been neighbors," Lt. Tim Diamond said Tuesday. "The grandma indicated she was having a hard time because he was very upset and yelling."

No arrests were made and no citations were issued, and West Bloomfield Township officers had no further contact with Hoffman or Layne until Friday.

"We're still scratching our heads" trying to determine the events leading up to the shooting, Diamond said.

According to testimony Monday at Layne's arraignment, Hoffman called 911 on Friday evening and told a dispatcher his grandmother shot him. When officers arrived at the family's condo, Layne was standing inside a door with the gun. She put it on the floor after officers ordered her to and exclaimed "she had just murdered her grandson," a detective told the judge.

Layne has not told investigators why she bought the weapon, Diamond said. She is due back in court Thursday.

Hoffman was living with his grandparents, while his parents, who live in Arizona, were going through a divorce.

Rabbi Josh Bennett said during Hoffman's eulogy Tuesday that it was the teen's decision to remain in Michigan to complete his senior year in high school and that he recently had been accepted to Eastern Michigan University.

Classes were cancelled Tuesday at Farmington Central. Dozens of classmates and students from the school joined Hoffman's parents and other relatives at his funeral in Southfield.

"It's easy to focus on the tragic end of Jonathan's life," Bennett said the funeral. "What happened or what the details may be is not our job as a community of mourners. He really did count. We know that his short life mattered."

Along with his parents, Michael and Jennifer Hoffman, he is survived by a younger sister, Jessica Hoffman.