OAKLAND (CBS SF) – A 17-year-old boy pleaded no contest Thursday morning and faces seven years in prison for setting another teen’s skirt on fire on an Alameda-Contra Costa Transit bus last year, according to the Alameda County District Attorney’s Office.

Richard Thomas was prosecuted as an adult for the attack on 19-year-old Luke “Sasha” Fleischman on Nov. 4, 2013.

READ MORE: Steph Curry, Draymond Green Ready For Play-In Game; Warriors To Take On Lakers Wednesday Night

Fleischman, a student at the time at Maybeck High School in Berkeley, doesn’t identify as male or female.

The teen suffered second- and third-degree burns after Thomas, who was 16 at the time, used a lighter to set the skirt Fleischman was wearing on fire as Fleischman slept on the bus traveling near MacArthur Boulevard and Ardley Avenue in Oakland at about 5:20 p.m.

Fleishman spent three weeks recovering at the burn unit at St.

READ MORE: Demonstrators Call on San Francisco to Keep Great Highway Closed to Cars

Francis Memorial Hospital in San Francisco.

While some called the attack a hate crime, Thomas’s defense attorney William DuBois characterized it as a prank that got out of control, saying the defendant was “mortified” when Fleischman became engulfed in flames.

The district attorney’s office charged Thomas with aggravated mayhem and assault, but Thursday he pleaded no contest to only the felony assault charge with an enhancement for inflicting great bodily injury.

Thomas is scheduled to be sentenced on Nov. 14 and, according to the plea deal, will be sentenced to seven years in state prison. With good conduct in prison, he could be eligible for a modified sentence on his 18th birthday, according to prosecutors.

MORE NEWS: Marin County Steps Up Effort to Vaccinate Youth

Fleischman’s family was kept apprised of the negotiations for Thomas’s plea deal, prosecutors said.