LUBBOCK, Texas – Juan Ramiro Villanueva, 42, admitted on Thursday to performing sexual acts on a 6-year-old child as part of a plea agreement, and now faces up to 30 years in prison.

The documents say that a woman from Lamesa, Texas found a video of Villanueva engaging in sexual acts with the child and reported it to the Lubbock Police Department.

When authorities interviewed Villanueva on August 25, he admitted that he had produced the video himself using a cell phone, according to court documents.

Villanueva is charged with Production of Child Pornography. Villanueva will be sentenced later if a federal judge accepts his plea deal.