A 17-year-old Northern California boy who set another teen on fire on a public bus in what authorities said was a hate crime is set to spend seven years at a state juvenile facility.

Prosecutors charged Richard Thomas of Oakland as an adult with hate crimes in the attack. Police say Thomas told investigators he was homophobic.

He was sentenced Friday.

Sasha Fleischman suffered second- and third-degree burns when the skirt the teen was wearing was set on fire last November on a bus in Oakland, California.

Fleischman identifies as neither male nor female.

The San Francisco Chronicle reports that Fleischman's mother Debbie Crandall Thomas told Thomas he did a terrible thing but the family does not hate him because hate leads to more hate and anger.

Thomas' attorney, William Du Bois, said his client engaged in a prank that went wrong.