A man charged with raping a child is said to have killed himself in a Pennsylvania prison after being urged on by fellow inmates.

Lancaster County Commissioner Scott Martin said Wednesday that prisoners were yelling for Luis David Villafane to hang himself before he died Nov. 19.

Martin said prison guards ran to Villafane's cell when they heard the commotion and tried unsuccessfully to save him. He said some inmates yelled at Villafane not to do it.

Martin said the 28-year-old Villafane hanged himself with knotted bedsheets shortly after being transferred to a cell block for inmates who are being disciplined.

The prison and Lancaster city police are investigating Villafane's death. He was arrested in June on charges he raped a child 12 or younger in 2001.