The final arguments have been delivered in the trial of the Californian teenager accused of murdering his gay classmate.

The lawyers for Brandon McInerney, who is now 17, said he reached an emotional breaking point after being sexually harassed by the boy.

They contend McInerney came from a violent upbringing, and that he snapped when he heard moments before the shooting that Larry King wanted to change his first name to Latisha.

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’s lawyer Scott Wippert said there had been no problems with Larry King until the murdered boy started wearing makeup, high heels and began sexually harassing McInerney in the weeks leading up to the shooting.

Wippert also blamed school administrators for not addressing the simmering feud between the boys. A number of teachers have testified that school administrators should have prevented King, who was gay, from wearing make-up and women’s clothes.

“We’re not saying Larry King is a terror, a bad kid, but the adults should have stopped this behavior,” Wippert said.

McInerney admits killing King but denies murder, instead seeking a conviction of voluntary manslaughter.

But Ventura County Deputy District Attorney Maeve Fox believes the nature of the shooting demonstrates there was not the “heat of passion” element necessary to commute the crime to manslaughter.

She said one student testified that she overheard McInerney say he was going to shoot King four days before it occurred. She said McInerney believed most of the school didn’t like King and killing him would make him a hero.

“He thought he was doing everyone a favor,” she said.

McInerney, she argued, had decided to kill King the day before, telling a friend he planned to shoot his classmate.

He hid a gun in his backpack and brought it to the school in Oxnard, southern California, where he shot King twice in the back of the head, a “cold-blooded execution”.

McInerney had white supremacist literature in his bedroom. McInerney’s lawyer called the revelation a “stunt” and said his client was writing a school report on Hitler and he and family members had a shared interest in German military.

McInerney is being tried as an adult and could face 50 years in prison for the killing if convicted of murder.