NORRISTOWN, Pa. — A man has been sentenced to 24 to 70 years in prison after he was convicted of crawling into a 6-year-old girl’s bed and raping her during a break-in at her family’s suburban Philadelphia apartment.

Oscar Herrera had been convicted in June of charges including rape of a child, burglary and indecent assault. He was sentenced on Thursday.

Prosecutors say the girl’s older brother awoke in November 2015 to sounds coming from his sister’s bunk at their Hatfield home. He alerted his parents after hearing a man’s voice.

The girl’s mother testified the 29-year-old Herrera was naked in bed with their daughter.

Herrera, who entered the country unlawfully, says he must pay for his mistake. His attorney has said Herrera had been drinking that night.