The Department of Justice on Monday asked a full appeals court to rule that the federal government has the power to hold sex offenders in custody indefinitely beyond the end of their prison terms.

The filing seeks the reversal of a three-judge panel's ruling last month that Congress overstepped its authority when it allowed civil commitment of "sexually dangerous" federal inmates. The panel of the 4th U.S. Circuit Court of Appeals said that the law intrudes on police powers that the Constitution reserves for states, many of which have their own similar statutes.

In asking the full 4th Circuit to rehear the case, the government argues that it assumes responsibility for inmates in federal custody and should be allowed to "create civil commitment procedures for such persons to protect the public safety."

Five inmates at the federal prison hospital in Butner, N.C., challenged the law after they were held beyond the end of their sentences. The federal public defender's office in Raleigh, which represented the inmates, declined to comment Monday.

In upholding a ruling by U.S. District Judge W. Earl Britt of Raleigh, the 4th Circuit panel had become the first federal appeals court to rule on an issue that's divided courts nationwide. The Richmond court's decision is only binding only in the states in the 4th Circuit: Virginia, North Carolina, South Carolina, West Virginia and Maryland.

Civil commitment was authorized by the Adam Walsh Child Protection and Safety Act, which took effect in July 2006. The act, named after the son of "America's Most Wanted" television host John Walsh, also established a national sex-offender registry along with other provisions.