Before Lipez, Circuit Judge, Souter, Associate Justice,
*fn1 and Howard, Circuit Judge.
In 2005, Eric Molignaro pleaded guilty to possession of child pornography and was sentenced to six months in prison and 36 months of supervised release, the latter subject to conditions intended to minimize the apparent risk of his sexual impropriety with children. In 2008, the district court tightened the conditions, which, in 2010, Molignaro was found to have violated by lying to his probation officer about his activities and by failing to take part in a course of therapy for sex offenders, after being suspended for lying to those conducting the course.
Acting under 18 U.S.C. _ 3583(e), the district court revoked the order for supervised release and resentenced the defendant. Federal advisory sentencing guidelines recommended imprisonment of 3 to 9 months after such a violation, but the district court ordered 22 months (followed by further supervised release). The court imposed the longer prison sentence so that Molignaro would have ample time to take part in a course of sex therapy at a nearby federal prison (Devens) that could run for up to 18 months, and although the judge did not state the period he would have imposed in the absence of the treatment program, he did say that 9 months would have been too short in light of what he found to be Molignaro’s choices to go where children were present and the risk of untoward behavior was great. Molignaro objected that setting the imprisonment term with the goal of providing therapy was error as a matter of law, and that in any case 22 months was unreasonably long. We hold that the resentencing court’s objective of tailoring the length of imprisonment to provide adequate time for treatment was barred by statute, and we vacate the sentence and remand for resentencing.