BALTIMORE (AP) -- Federal prosecutors say a Hagerstown man has been sentenced to 10 years in prison for possession of child pornography.

Thirty-four-year-old Johnny Daniel Duran was also ordered to register as a sex offender at sentencing Wednesday.

According to a plea agreement, Duran shared images and videos of child pornography using a file-sharing program on the Internet. Prosecutors say Duran shared such files with an undercover investigator with Maryland State Police.

In 2006, Duran was convicted of distribution of child pornography in Frederick County Circuit Court and sentenced to 18 months in jail.