Supreme Court justices signaled Tuesday that they are likely to uphold a national law that permits the civil commitment of 'sexually dangerous' people after they complete their federal prison terms. Hearing arguments in Washington, most of the nine justices suggested they viewed Congress as having the constitutional power to enact the law. A federal appeals court said the 2006 measure, under which more than 100 people have been held, exceeded Congress's authority. The case tests the power of the federal government to play a role in preventing sex crimes, traditionally a state function. Although the high court has reined in the federal government in other contexts over the past 15 years, Tuesday's hour-long hearing revealed more concern about ensuring public safety than interest in protecting states' rights. 'You are talking about endangering the health and safety of people,' Justice Ruth Bader Ginsburg said. 'The government has some responsibility, doesn't it?' Justice Antonin Scalia alone voiced criticism of the statute, repeatedly saying the federal government was intruding on state powers. He said federal prison officials could accomplish the same goal by notifying state authorities when a dangerous person is about to be released and asking them to begin commitment proceedings. 'I find it difficult to believe that an elected governor or an elected attorney general would ignore that letter,' Scalia said. He characterized the Obama administration's arguments in favor of the law as 'a recipe for the federal government taking over everything.' The law, part of the Adam Walsh Child Protection and Safety Act, directs the attorney general to 'make all reasonable efforts' to persuade states to assume responsibility for the custody and treatment of committed people. The civil commitment law is being challenged by five men held under the measure. Four of them have completed prison sentences for sex crimes, while the fifth was held incompetent to stand trial on charges of sexually abusing a child. They are being held in a treatment facility in Butner, N.C. Before the law's enactment, the federal government's civil commitment power covered people in U.S. custody who were found incompetent to stand trial, found not guilty by reason of insanity or determined after conviction to be mentally ill. Solicitor General Elena Kagan, the Obama administration's top Supreme Court lawyer, said the commitment power stemmed from 'the power to run a responsible criminal justice system.' Her argument resonated with Justice Stephen Breyer, who said that government-run hospitals on occasion need to restrain people for their own protection or that of someone else. 'Once you are down the road where you admit the government can do that, how is a prison any different?' he asked G. Alan DuBois, the lawyer representing the men. Similarly, Justice John Paul Stevens likened the commitment of sexually dangerous individuals to the quarantining of federal prisoners who have tuberculosis. Chief Justice John Roberts and Justices Anthony Kennedy and Samuel Alito also hinted with their questions that they were likely to support the government. 