A 56-year-old New Brunswick man has been sentenced to two years in prison after pleading guilty to child pornography charges.

Gregory George Shaffer of Elgin, N.B., was charged with making available child pornography, possession of child pornography, and personation with intend.

He was sentenced in Moncton Provincial Court on Wednesday.

A previous charge of one count of accessing child pornography was vacated.

Shaffer’s charges stem from an investigation into images of child sexual abuse that began in March 2018.

On Nov. 20, 2018, police searched a residence in Elgin, N.B., where they seized several electronic devices and arrested Shaffer at the scene.

In addition to two years in prison, Shaffer has been added to the National Sex Offender Registry for 20 years, and will be required to submit a DNA sample. Following his release from prison, he will have to abide by conditions set out by the court, including not accessing the internet.