LUBBOCK, Texas — A man was arrested Thursday and federally charged with production of child pornography, according to court records.

Juan Villanueva, 42, was arrested by the FBI and taken to the Lubbock County Detention Center.

In late July, a woman told the Lamesa Police Department about a video of Villanueva performing a sexual act on a 6-year-old, according to court documents.

It had been uploaded to the woman’s online storage account while Villanueva was using her phone, court documents said.

Law enforcement was not able to find the video, and the woman told police she believed Villanueva was able to delete the video after she confronted him about it, according to court documents.

When interviewed by Lamesa police, Villanueva denied producing the video or assaulting the child.

However, in an interview with the Texas Department of Public Safety and the FBI, Villanueva admitted to creating the video, court documents said.

Villanueva also admitted to having a sexual relationship with a 16-year-old girl in 2016 or 2017. Detectives located several sexual videos of Villanueva and the girl on a Google Drive account, according to court documents.

As of Friday, Villanueva remained in the Lubbock County Detention Center.