Los Angeles (CNN) -- A judge declared a mistrial Thursday after jurors said they were hopelessly deadlocked in the murder trial of a teenager accused of gunning down a gay classmate in their Southern California classroom.
Ventura County Superior Court confirmed the ruling in the eight-week trial of Brandon McInerney, who was 14 at the time of the shooting in 2008.
The nine-woman, three-man jury panel said its last vote resulted in seven in favor of finding the defendant guilty of voluntary manslaughter, CNN affiliates reported.
McInerney was tried as an adult on charges of first-degree murder, use of a handgun and a hate crime.
McInerney, now 17, allegedly shot 15-year-old Lawrence King, an eighth grader at E.O. Green Junior High School in Oxnard, twice while both were typing papers in a computer lab for their English class, authorities said.
King, an openly gay teenager, was seated in the middle of the classroom with two dozen students and their teacher when McInerney allegedly shot him in the back of the head, authorities said.
Friends said King was proud of being openly gay. He liked wearing jewelry and makeup to school, and he often wore high-heeled boots with the school uniform. He asked his teachers to call him Leticia instead of Larry. Some students bullied him, pupils said.
The prosecution alleged McInerney had planned to shoot King over unwanted sexual advances, and said that McInerney had white-supremacist leanings, according to affiliate KABC.
The defense contended McInerney had a violent upbringing. It also argued that King taunted and flirted with McInerney, ultimately sparking the fatal confrontation, KTLA reported.
The trial was held in Chatsworth, in neighboring Los Angeles County, because the defendant successfully sought a change of venue in the high-profile case, said Ventura County Chief Deputy District Attorney Mike Frawley.
CNN's Michael Martinez contributed to this report.