Superintendent of Police Bharat Singh said that the inmate, Shyam Kumar Yadav, had eve-teased a female jail guard last evening.
Agitated with his act, the jail guards assaulted Yadav, who later died at the district hospital, he said.
When the inmates came to know about the undertrial's death, they clashed with the jail guards and indulged into brick-batting, the SP said, adding 26 people, including six policemen, were injured in the incident.
The SP said that the matter is under investigation.