The Oakland teen who set a gender non-conforming high school student's skirt on fire on an AC Bus last year pleaded no contest Thursday to charges of felony assault and inflicting great bodily injury, and agreed to serve seven years in prison.

Richard Thomas, now 17, will be sentenced on Nov. 14 in Alameda County Superior Court, after being charged as an adult in the case, according to the District Attorney's Office. The hate crime and aggravated mayhem charges, which carried a sentence of up to life in prison, were dropped.

The parents of Sasha Fleischman, who identifies as agender rather than as male or female, said in a statement that they had "mixed emotions" about the prison sentence. They have long fought to have Thomas tried in juvenile court, not as an adult.

"On the one hand, we are relieved that Sasha will not need to relive the events of past November in court. They are well on the road to recover and have moved to to the next chapter of their life," Fleischman's mother Debbie Crandall wrote.

"At the same time, our hearts go out to Richard and his family. Because of what seems to have been a childish, impulsive, tragic lack of judgement on the part of Richard, his and his family's lives have been altered even more severely than ours. We have stated before, and continue to believe, that a 16-year-old's actions, however severe the results, have no place in an adult judicial system."

Thomas had set Fleischman's skirt, and subsequently legs, on fire while riding AC Transit bus No. 57 in Oakland on Nov. 4, 2013. Fleischman, who was 18 at the time and a student at Maybeck High School in Berkeley, suffered second- and third-degree leg burns and spent nearly three weeks in the hospital. Surveillance video from the bus led to Thomas' arrest a few days after the attack.

District Attorney Nancy O'Malley charged the then-16-year-old with a hate crime, aggravated mayhem and felony assault. She also took the unusual step of charging the teen as an adult, a move Fleischman's family opposed. Thomas' family told reporters at one of his court hearings that he intended the act as "a joke."

Many in the Bay Area rallied around the agender teen, lining the streets with rainbows and wearing skirts to school, to show their support for Fleischman and the spectrum of gender identities.

Shortly after the arrest, Thomas' attorney William DuBois told NBC Bay Area that the teen hurt Fleischman as a prank, but he was not filled with hate.

"As a matter of fact, he doesn't even know how to spell homophobic, let alone be homophobic," DuBois said at the time."There are members of his family who are gay. He has absolutely not a homophobic bone in his body."

Just before Thomas turns 18 in July, a judge will be able to modify his sentence to five years if he has behaved well in prison, under the terms of the agreement with prosecutors.

NBC Bay Area legal analyst Steven Clark said Thomas should feel lucky.

“He was facing a life sentence because they first charged him with aggravated mayhem and a hate crime," Clark said. "He should be grateful for both the sentence and Sasha’s forgiveness.”