PORTLAND, Maine — A Massachusetts man was sentenced to four years in prison for possession of child pornography during a hearing Tuesday in U.S. District Court.

William Duffy, 59, of Attleboro, Massachusetts, also was ordered to undergo five years of supervised release upon completing his prison term and to pay $5,000 in restitution to one of the victims of sexual abuse.

According to court records, deputies with the Cumberland County Sheriff’s Office in May 2015 executed a search warrant for Duffy’s laptop computer at his Sebago residence. A forensic analysis revealed 4,475 still images and 261 video files depicting minors being sexually abused, many depicting adults abusing prepubescent minors and infants.

In determining the sentence, Judge George Singal noted that possessing child pornography encourages the sexual abuse of children and elevates the trauma that victims of sexual abuse already endured.

“Simply creating a market for child pornography guarantees that more children will be abused,” he said.

“The impact of early childhood abuse never goes away. It’s there all the time,” he added.

“We have a population … of [people] who live day by day knowing that the video and photographs of their abuse are not only being distributed but continue to fuel sexual gratification of people who view them. And that never ends. … It’s always there and will be there even after they are dead,” Singal said.

The investigation was conducted by the FBI, the Cumberland County Sheriff’s Office and the Maine State Police Computer Crimes Unit.