A Guatemalan citizen living in the United States illegally was sentenced Monday to 50 years in prison for raping a 6-year-old girl in Tennessee.

Edwin Alfredo Velasquez-Curuchiche, 42, faced two counts of rape of a child, the Tennessean reported.

He will serve the sentence concurrently with another 50-year federal prison sentence for receiving child pornography, which is related to the child rape investigation.

He lived in the same trailer park as the girl’s family and befriended them, eventually tricking the mother into letting him borrow her house key and making a copy without her knowledge, prosecutors said.

On Oct. 29, 2015, Lebanon police detained him after he was found hiding in the child’s bedroom. The family had been at the store and the girl’s father found Curuchiche and held him until police arrived.

Police later found two video recordings dated Sept. 23, 2015 and Oct. 1 of the same year showing him molesting the child, prosecutors said. He was accused of sneaking into the family’s home on both dates to record himself molesting the child while she slept.

Neither video showed the girl's face, but unique birthmarks, shoes, clothing and bedding led authorities to determine the victim was the 6-year-old girl, the paper reported.

He had been detained in 2013 when he tried entering the U.S. illegally. He failed to appear at an immigration hearing.