A judge in California has declared a mistrial in the case of Brandon McInerney accused of killing gay student Lawrence King.

The jury considering the case of 17-year-old McInerney was unable to reach a verdict, The Los Angeles Times reported.

The 8-week trial included over 100 witnesses, including many students and teachers at E.O. Green Junior High School in Oxnard, where 15-year-old King was shot to death.

Not in dispute is the fact that McInerney killed King with two bullets to the back of the boy's head in a computer classroom on the morning of February 12, 2008. King died in the hospital on Valentine's Day.

But jurors could not decide whether McInerney, then 14, deserved to be convicted of voluntary manslaughter or first-degree murder.

Defense lawyers argued that McInerney suffered abuse at the hands of his drug-abuser father, and didn't deserve to be tried as an adult.

Family members testified that the McInerneys divorced in 2000 amid allegations of spousal abuse and drug addiction. The father, who has subsequently committed suicide, often humiliated his son in public.

King told friends and family he was gay and often wore makeup to school. Students testified that he either had a crush on McInerney or delighted in teasing the boy, asking him, “What's up baby?” the day before King's murder.