A man was jailed on $5 million bail after police say he castrated a paraplegic man Monday night in Southwest Philadelphia.

Investigators say Edgar Bonilla, 41, attacked a paraplegic resident inside an assisted-living facility shortly after 7 p.m. at the Inglis Apartments at Elmwood on the 6200 block of Eastwick Avenue. Investigators say Bonilla cut off the man’s testicles during the attack.

Bonilla was arrested by responding police officers while the victim was taken to the Hospital of the University of Pennsylvania where he was listed in critical condition.

Philadelphia Police Lt. John Walker says Bonilla was visiting a female friend at the facility and that she apparently had some sort of dispute with the victim.

Walker says Bonilla was apparently trying to settle that dispute. The victim, Bonilla and the woman were all apparently friends.

Bonilla is charged with assault, robbery, theft and other related offenses. He was held on $5 million bail.