A Bangor man pleaded guilty in federal court on Wednesday to creating child pornography with a camera hidden in a bathroom.

Jeffrey Swimm, 38, of Bangor, admitted in U.S. District Court in Bangor that he shot still pictures and video of a minor and also collected pornographic imagery of children under age 12 from the internet, according to the U.S. Attorney’s Office.

Swimm faces up to 30 years in prison for child exploitation and up to 20 years for possessing child pornography, plus a $250,000 fine on both counts and up to and life on supervised release.

He will be sentenced after the completion of a presentence investigation report, officials said.