WICHITA, Kan. (AP) — A 39-year-old Kansas man has been sentenced to 10 years in prison for an Internet sex crime he committed while confined as a sexual predator at Larned State Hospital.

Mark D. Brull was sentenced Wednesday after pleading guilty in July to one count of transferring obscene materials to a minor. Prosecutors say Brull gave co-defendant Ryan Dancosse passwords to Brull’s profiles on social networking sites and Dancosse uploaded pornographic images to Brull’s accounts.

Brull started communicating with the teen by telephone and email in 2011 and guided him to the images, which Brull and the boy would discuss. Prosecutors say the teen also sent lewd pictures of himself, which Dancosse would describe to Brull.

Dancosse has pleaded guilty to receiving child porn and is to be sentenced Oct. 2.