A New York City substitute teacher was charged Thursday morning with a hate crime after he  yanked an 8-year-old student's hijab off her head, police said.

Oghenetega Edah, 31, was arraigned in Bronx Criminal Court on charges of aggravated harassment as a hate crime and endangering the welfare of a child, WPIX reported

According to the criminal complaint, Edah kicked the child's foot and hit her hand in a classroom at P.S. 76 before threatening her, saying "If you don't behave, I'm going to take your scarf off."

The victim, who is in second grade, told him that he couldn't take off her hijab because it is against her religion and others are not allowed to see her hair, according to the complaint. The teacher responded "I want to see your hair" and took off her hijab in front of the classroom, according to the complaint.

The girl was treated for an eye injury after the attack, WPIX reported.

Edah surrendered to police on Wednesday.