PORTLAND, Maine — A former school janitor made his first appearance Friday in U.S. District Court on child pornography charges.

Joseph Finocchiaro, 61, of Bath is charged with receipt of child pornography and possession of child pornography.

Finocchiaro told police Thursday when he was arrested that he was allowed to retire early from a Massachusetts school district after he printed images of young children from a computer owned by the town for which he worked, according to a court affidavit.

Finocchiaro is temporarily being held without bail until a detention hearing can be held next week, according to the U.S. attorney’s office.

The investigation that led to his arrest began in 2010 with the U.S. Postal Service’s investigation into International Company’s website, which was the subject of more than 20 complaints to the National Center for Missing and Exploited Children’s Cyber TipLine regarding the sale of child pornography, according to court documents.

Finocchiaro allegedly purchased at least 16 DVDs on five different occasions from the firm, which is located outside the U.S., between November 2010 and April 2011. He paid more than $400 for the DVDs, according to court documents.

During the execution of a search warrant at Finocchiaro’s home Thursday, investigators found the DVDs from the International Company, the affidavit said.

Police also found printed images of naked and partially naked children ranging in age from toddlers to about 15 years of age, according to court documents. The pictures had been arranged in a collage.

“Finocchiaro stated he previously was employed as a janitor for a school department in Massachusetts,” the affidavit said. “According to Finocchiaro, he was allowed to retire early due to an issue concerning him printing images of young children — similar to the collection on his collage — from a computer owned by the town for which he worked.”

Court documents do not name where in Massachusetts Finocchiaro worked or lived.

If convicted, he faces a minimum of five years and not more than 20 years on the receipt of child pornography charge. On the possession charge, he faces up to 10 years in prison. He also could be fined up to $250,000 on each charge if convicted.