MIAMI (CBS4) – Opening statements got underway Thursday in the trial of a Coral Gables High School student accused of stabbing a classmate to death.

Andy Rodriguez, 18, is charged with second degree murder in the death of 17-year-old Juan Carlos Rivera, who was stabbed to death at Coral Gables High School in September 2009.

READ MORE: NBA fines Miami Heat $25,000 for violating 'bench decorum'

Rodriguez is accused of stabbing Rivera with a box cutter as a fight between the pair spilled out into a school courtyard, where the wounded teen collapsed and died.

Investigators say the two barely knew each other, but Rodriguez was upset because he believed that his girlfriend had given Rivera rides to school.

Rodriguez is claiming self-defense but prosecutors said in opening statements that Rodriguez committed premeditated murder.

READ MORE: Man faces several charges including pointing laser at BSO aviation unit

“The defendant is guilty of murder, out of the jealousy and hate he had over Juan Carlos’ interest he had in his high school girlfriend,” said prosecutor Jean-Michael D’escoubet.

Rodriguez’ defense attorney Lane Abraham showed the jury, by getting down on the floor and acting out the fight, why Rodriguez acted in self-defense.

“The other boy got the advantage quickly over Andy, and Andy was on the ground with the other boy behind him. The other boy was behind him and had him in a chokehold,” explained Abraham on the floor in front of the jury.

The six-member jury will also see security video from the school which captured Rodriguez and Rivera fighting in the crowded school’s courtyard during a break between classes. Off camera, Rivera was stabbed five times; the fatal wound punctured his heart.

MORE NEWS: Miami ex-Proud Boys leader Henry 'Enrique' Tarrio to stay jailed until Capitol riot trial

The trial is expected to last about two weeks. Rodriguez faces life in prison if convicted.