According to police, A Bhaskar Rao (33), a mathematics teacher at a private school in Kancharapalem area, had been allegedly misbehaving with a class IX girl for the past few weeks.
Though the girl complained to the principal of the school, the authorities did not take any action against him, sources claimed.
Later, the girl narrated the matter to her parents after which the locals last evening caught hold of the teacher and thrashed him up severely.
He was later handed over to police and a formal complaint was lodged against him by the girl's mother.
Assistant Commissioner of Police (North) CM Naidu said a case has been registered against the accused under section 10 of Protection of Children from Sexual Offences Act and section 354(A)(sexual harassment) of IPC.
The accused was arrested and admitted to a hospital as he was badly injured in the assault.