The statute authorizes the Department of Justice to detain a mentally ill, sexually dangerous federal prisoner beyond the date the prisoner would otherwise be released. P must certify that D has engaged in sexually violent activity or child molestation in the past and that he suffers from a mental illness that makes him correspondingly dangerous to others. The statute automatically stays the individual's release from prison, thereby giving the Government an opportunity to prove its claims at a hearing through psychiatric (or other) evidence. D is to be represented by counsel” and shall have “an opportunity” at the hearing “to testify, to present evidence, to subpoena witnesses on his behalf, and to confront and cross-examine” the Government's witnesses. P must prove its claims by “clear and convincing evidence.” If so confinement will last until either (1) the person's mental condition improves to the point where he is no longer dangerous (with or without appropriate ongoing treatment), in which case he will be released; or (2) a State assumes responsibility for his custody, care, and treatment, in which case he will be transferred to the custody of that State. P instituted proceedings against Ds. Three of the five had previously pleaded guilty in federal court to possession of child pornography, and the fourth had pleaded guilty to sexual abuse of a minor. The fifth had been charged in federal court with aggravated sexual abuse of a minor but was found mentally incompetent to stand trial. Ds moved to dismiss claiming that the commitment proceeding is, in fact, criminal, not civil, in nature. They claimed that the statute denies them substantive due process and equal protection of the laws. They claimed that it violates their procedural due process rights by allowing a showing of sexual dangerousness to be made by clear and convincing evidence, instead of by proof beyond a reasonable doubt. They also claimed that, in enacting the statute, Congress exceeded the powers granted to it by Art. I, § 8 of the Constitution, including those granted by the Commerce Clause and the Necessary and Proper Clause. The District Court held that the Constitution requires proof beyond a reasonable doubt, and it agreed that, in enacting the statute, Congress exceeded its Article I legislative powers. The Court of Appeals for the Fourth Circuit upheld the dismissal on this latter, legislative-power ground. The Supreme Court granted certiorari.