MINNEAPOLIS (AP)  -- A longtime substitute teacher in Fergus Falls has been sentenced to five years in prison on a child pornography charge.

Authorities say that undercover agents discovered that Joshua Noble was active on an internet-based messaging service called Chatstep. He allegedly had more than 240 images of children under 12.

The 39-year-old Noble pleaded guilty in June to distribution of child pornography.

Noble also was ordered to pay $26,000 in restitution and pay a $5,000 special assessment to the Domestic Trafficking Victims Fund.

Noble subbed in Fergus Falls for about 15 years.

More From AM 1240 WJON