A GoFundMe page has been set up to cover the legal expenses of a Los Angeles high school teacher who was arrested Friday for allegedly hitting a 14-year-old student who allegedly had thrown a basketball at him and called him a racial slur, The Los Angeles Times reported.

Marston Riley, 64, a black teacher at Maywood Academy High School, had asked a student to leave because he wasn't wearing the school's uniform, students told KTLA. The student allegedly threw a basketball at Riley and hurled racial insults, the report said. Riley reportedly told the student leave several times. When the student remained defiant, Riley allegedly threw punches. The alleged incident was recorded on students' phones.

CALIFORNIA MUSIC TEACHER ARRESTED AFTER VIDEO CAPTURES HIM PUNCHING STUDENT

The Sheriff's Department said the boy was treated for minor injuries at a hospital then released. Riley was arrested on suspicion of committing cruelty against a child, NBC Los Angeles reported. Riley was released Saturday after posting $50,000, according to sheriff's department inmate records cited by The Times.

Riley has received support from students and staff, some of whom described him as a "really nice teacher" who "always had a really good relationship with every student," according to The Times.

Marston Riley was arrested Friday on suspicion of child abuse, authorities said. 

Marston Riley was arrested Friday on suspicion of child abuse, authorities said.  (GoFundMe)

Cecilia Diaz Jiimenez, a Maywood resident who worked at the same school district as Riley, set up a GoFundMe page Saturday to help cover his legal expenses. She said Friday's incident was not the first time Riley had been physically or verbally attacked by a student. By Sunday evening, the page had raised nearly $22,000 of its $50,000 goal.

The Los Angeles Unified School District said it is cooperating with law enforcement in its investigation of the incident. According to the GoFundMe page, the school district is "looking at dismissing (Riley)."

Riley is scheduled to be arraigned later this month, authorities said. The Times could not reach Riley for comment.

Maywood is about a 15-minute drive south of Los Angeles.