A Charleston man was sentenced to 18 years in prison for sending a photo online of himself fondling a toddler.

James M. Prevatt II, 36, pleaded guilty Thursday in a Charleston courtroom to third-degree criminal sexual conduct with a minor and first- and second-degree charges of sexual exploitation of a minor.

The sentence was part of a negotiated plea with prosecutors that capped the maximum sentence at 18 years, one that Circuit Judge Roger Young accepted but one he said he would have liked to have doubled, if he could.

Prevatt, who is married with children, was caught by the Internet Crimes Against Children Task Force, a collaboration between the S.C. Attorney General's Office and local investigators. The investigation of Prevatt began in 2010 in Canada, when a 24-year-old woman there reported some activity she'd encountered in an online sex chat room, according to Bethany Miles, the case prosecutor from the Attorney General's Office.

The woman told authorities she received pornographic images of a 17-month-old baby from Prevatt's brother, Michael, 28, who was later sentenced to five years in federal prison for distribution of child pornography for sending the photo, according to Miles.

James Prevatt had sent the photo to his brother, Michael, who was living in Virginia, prosecutors said.

"The Royal Canadian Mounted Police reported it to the National Center for Missing and Exploited Children," said Doug Gallucio, the investigator with the Charleston Police Department and the task force.

"He (James Prevatt) took the pictures, embedded the picture in an email to his brother."

James Prevatt also told his brother in the email that he sexually abused the toddler, prosecutors said.

James Prevatt admitted to authorities he took and sent the photograph, according to prosecutors.

Prevatt's attorney, Brian Johnson, said Dr. William Burke, a forensic psychiatrist, evaluated Prevatt and diagnosed him with pedophilia and treated him for five months following his arrest. Prevatt had no prior criminal record. During the hearing, he said little to the judge.

"I understand how serious these crimes are," Prevatt told the judge. "I want to get the help I need."

But Young was skeptical about rehabilitation for Prevatt and said the only reason he was capping the sentence at 18 years was because it was part of the plea negotiation.

"Well, I don't know what's the matter with you," Young said. "Maybe you can get some help. I don't know."

He also recommended Prevatt be reviewed for the Sexually Violent Predator Act program in the state, which provides for involuntary civil commitment of a mentally abnormal and extremely dangerous group of predators following their prison sentence.

If committed under the act, Prevatt would be taken into the custody of the S.C. Department of Mental Health, and held in a separate facility for long-term control and treatment after his jail sentence, according to the Attorney General's Office.

If he's ever released, Prevatt must register as a sex offender.

Reach Natalie Caula Hauff at 937-5594 or Twitter.com/ncaula.