AUGUSTA — A former Gardiner man who spent three years in a home for juvenile sex offenders pleaded guilty Wednesday to possession of sexually explicit materials picturing children under the age of 12.

Christian M. Cooper, 22, of Augusta, was ordered to spend two years behind bars and the remainder of the four-year sentence was suspended. He was placed on probation for six years.

Cooper’s case had been set for jury selection for a trial this week at the Capital Judicial Center. Instead, he opted to plead guilty to the charge and receive a sentencing recommendation supported both by his attorney, Lisa Whittier, and the prosecution.

In exchange for the plea, two identical charges also dated Nov. 12, 2014, in Gardiner were dismissed.

The prosecutor, Assistant District Attorney Suzanne Russell, said the charges arose after the Maine State Police Computer Crimes Unit discovered that child pornography was being downloaded and authorities checked the address in Gardiner.

There, Cooper’s mother told Detective Jason Bosco, “If you’re looking for the person with pedophilia tendencies, that would be my son,” Russell recounted Wednesday for Justice Michaela Murphy.

Cooper was arrested Nov. 12, 2014, and has been in jail since that date.

Russell said Cooper admitted possessing the pornography, and more than 200 images of child pornography — with children appearing to be younger than 5 — were found on his computer. She said the downloads from the peer-to-peer file sharing program appeared to begin in 2013 or earlier.

Cooper also told police he sexually molested a young child, but Russell said the state would be unable to prosecute the case successfully because the child was so young and because of when it occurred.

When the judge questioned Cooper about whether he was guilty of the child pornography charge as described by the prosecutor, he first said, “I imagined a vivid dream.” But then he said he was guilty.

Whittier said Cooper “suffers from some pretty serious autism,” but she believed he understood the charge and the consequences of his plea, and that it was in his best interest to accept the deal.

Both attorneys said Cooper had undergone a mental evaluation and had been found competent, although evaluators pointed out that he had some autism.

The judge also told Cooper that he must register as a sex offender for 25 years under the state’s Sex Offender Registration and Notification Act.

Conditions of probation prohibit Cooper from having contact with children under 18. He is also banned from possessing devices capable of accessing the Internet unless approved by his probation officer. Murphy, the judge, asked why there was not a complete ban on Internet-capable devices.

“Mr. Cooper spends most of his time playing video games,” Whittier said.

In urging the judge to impose the recommended sentence, Russell said that Cooper had no adult criminal record but that he had been housed for three years at a home for juvenile sex offenders. Russell said there were concerns about the early history of Cooper’s behavior and what appeared to be a lifetime addiction to pornography.

“We do believe he is a serious risk,” Russell said.

Betty Adams — 621-5631

[email protected]

Twitter: @betadams