James Jenkins wanted to end it. No more fantasies. No more molesting little girls. He knew he was the only one who could stop it; he was just waiting for the right time.

The right moment arrived one night nearly three years ago when he was alone in an Accomack County, Va., jail cell. He had spent five years in a Virginia prison for sexually molesting three young girls and another 2 1/2 years for violating his parole. The next morning, a prosecutor was going to ask a judge to commit him to a state facility for high-risk sex offenders. Jenkins could think of only one way out.

He asked a jail guard for a razor. He told the guard he wanted to look nice and cleanshaven for his court hearing the next day. The guard hesitated but handed Jenkins the blade. Jenkins walked to the shower in his cell. He bit the blade out of its plastic casing and stuffed an apple in his mouth to muffle his screams. Then he castrated himself and flushed his testicles down the jail cell toilet.

Jenkins, 63, doesn’t flinch when he talks about it now. "Castration has done precisely what I wanted it to do," he said. "I have not had any sexual urges or desires in over two years. My mind is finally free of the deviant sexual fantasies I used to have about young girls."

He spoke with the clinical cool of a surgeon as he tried to explain his pedophilia during a rare interview in a guarded room of the Virginia Center for Behavioral Rehabilitation, the sex offender treatment center where Jenkins was sent. The Petersburg facility is part of a new way the state is trying to keep sex offenders off the streets: Identify the most dangerous before they are released from prison and ask a judge in civil court to commit them to a treatment facility even after they have completed their sentences.

Jenkins readily admits that the prospect of being confined indefinitely partly prompted his drastic action three years ago. But he also insists he did it to prevent himself from victimizing another child.

"I’m all for castration for certain sex offenders," he said. "I think it would do a lot to prevent recidivism and the amount of money we have to spend on treatment centers like the one I’m in."