In two starkly different challenges Tuesday, the U.S. Supreme Court vigorously questioned the federal government’s power to detain sexually dangerous prisoners beyond their federal prison sentences and appeared sympathetic to arguments that a treaty requires a divorced American mother to return her child to Chile.

In U.S. v. Comstock, Solicitor General Elena Kagan defended the section in the 2006 Adam Walsh Child Protection and Safety Act that authorizes the federal government to detain by civil commitment any “sexually dangerous” federal prisoner even after he or she has served the sentence for the underlying crime.