WASHINGTON (CNN) -- The Supreme Court will review a federal law allowing convicted sex offenders deemed "sexually dangerous" by the government to remain in prison even after they have completed their sentences.
This year, the high court blocked the release of sex offenders after claims that they remain dangerous.
At issue is the constitutionality of federal "civil commitment" for sex offenders who are nearing the end of their confinement or who are considered too mentally incompetent to stand trial.
The case will be heard in the high court term beginning in October. The prisoners will remain in jail until the court rules, expected next year.
The main plaintiff in the case, Graydon Comstock, was certified as dangerous just six days before his 37-month federal prison term for processing child pornography was to end. He and the others filing suit remain confined at the Butner Federal Correctional Complex near Raleigh, North Carolina.
Three other inmates served prison terms of three to eight years for offenses ranging from child pornography to sexual abuse of a minor. Another was charged with child sex abuse but declared mentally incompetent to face trial. All were set to be released more than two years ago, but government appeals have blocked their freedom.
Corrections officials and prosecutors determined that the men remained a risk for further sexually deviant behavior if freed.
The inmates' attorneys maintain that their continued imprisonment violates their constitutional right of due process and argue that Congress overstepped its power by allowing inmates to be held for certain crimes that normally would fall under the jurisdiction of state courts.
The law in question is the 2006 Adam Walsh Child Protection and Safety Act, which includes a provision allowing indefinite confinement of sex offenders. A federal appeals court in Richmond, Virginia, ruled that lawmakers had overstepped their authority by passing it, prompting the emergency appeal to the Supreme Court.
The appeals court found that the government was "civilly confining former federal prisoners without proof that they have committed any new offense" and giving the attorney general the improper unilateral authority to do this without presenting new evidence. It ruled that as many as 77 North Carolina inmates should be released, some almost immediately.
In April, the high court blocked the imminent release of dozens of sex offenders who have served their federal sentences, after the Obama administration claimed that many of them remain "sexually dangerous." Chief Justice John Roberts ordered that the men be kept in custody while the case worked its way through the high court.
The Justice Department had urged against any early release, with new Solicitor General Elena Kagan writing that it "would pose a significant risk to the public and constitute a significant harm to the interest of the United States."
Most violent sex offenses are handled at the state level, and at least 20 states run programs in which sexual predators are held indefinitely or until they're no longer considered dangerous. The federal government's civil commitment program is relatively new.
The Adam Walsh Act was named after the son of "America's Most Wanted" host John Walsh. The boy was kidnapped and murdered by a suspected child molester in 1981.
The law also increased punishments for certain federal crimes against children and created a national registry for sex offenders. Those aspects of the bill are not being challenged in this case.
The case is U.S. v. Comstock (08-1224).