The trial of a California boy accused of murdering his gay classmate is expected to end this week.

Lawyers for Brandon McInerney, now 17, were expected to rest their case today.

The teenager was 14 when he shot dead 15-year-old Larry King in a lesson at E.O. Green Junior High School in Oxnard, California, in February 2008.

McInerney admits killing King but denies murder. His lawyers say he was provoked by King’s sexual advances and was the victim of a violent upbringing. They are seeking a conviction of voluntary manslaughter.

The case has focused on a motive for the killing. A number of teachers have testified that school administrators should have prevented King, who was gay, from wearing make-up and women’s clothes.

The prosecution has claimed that McInerney had strong white supremacist and anti-gay beliefs, as per materials that were found in his bedroom.

McInerney is being tried as an adult for the shooting and could face life in prison if convicted.