SIOUX FALLS, S.D. (AP) — A convicted sex offender has pleaded guilty to two counts of possession of child pornography in a Sioux Falls court.

The Argus Leader reports 40-year-old Mario Castaneda Jr. initially faced five child pornography charges after officers followed a lead from a Rapid City internet detective.

Deputy Minnehaha County state's attorney Randle Sample said Wednesday the detective came across an IP address that was keeping and distributing child pornography. Sample says the IP, which is a numeric address given to a computer connected to the Internet, was traced back to Castaneda's Sioux Falls home.

Detectives executed a search warrant and seized two computers from the home.

Castaneda was convicted of sodomy of a child under the age of 12 and indecent acts with a child a decade ago in Kentucky.

Copyright 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.