A 20-year-old Portland man who video recorded children urinating in public bathrooms and shared child pornography online pleaded guilty Tuesday to two federal charges of transportation and possession of child pornography.

Anthony Thea admitted to police, who seized his computer while executing a search warrant last October, that he used the computer to share child pornography and used his cellphone to make video recordings of children in bathrooms, according to court records.

Thea had been scheduled to stand trial next month in U.S. District Court in Portland when he decided to change his pleas to guilty on the two charges. He faces five to 20 years in prison on the transportation count and up to 20 years on the possession count. His sentencing date was not immediately available.

Thea has been detained since his Oct. 16 arrest and remains in custody.