The Bihar Police have arrested a man for allegedly raping a two-year-old child in the state’s Gaya district on Tuesday. The child is undergoing treatment and is in a critical condition, the Hindustan Times reported on Wednesday.

The police have not yet identified the accused. He reportedly saw the child playing outside a house on Tuesday, and dragged her into his house and raped her. The police have filed a case against him under the Protection of Children from Sexual Offences Act.

“The cries of the girl alerted passersby, who rushed to her rescue,” Vishnupad police station house officer Udai Kumar was quoted as saying. “One of the local residents informed the police, who rushed the girl to the JPN Hospital in a subconscious state.”

Residents of the area beat up the accused before handing him over to the police. Several relatives allegedly also pelted stones at the police station demanding that they be allowed to punish the man.