BANGOR — A Madison man convicted of possession of child pornography was sentenced Wednesday in federal court to six years in prison.

John McKenzie, 46, of Madison, pleaded guilty July 12 and was sentenced in U.S. District Court in Bangor. He also was ordered to pay $26,650 in restitution to his victims.

According to court records, police found thousands of images of child pornography on a computer and hard drive that were seized from McKenzie’s home in December 2010.

Some of the images had been altered so that it appeared that the children depicted were engaged in sexually explicit conduct.