A divided U.S. Supreme Court on Thursday upheld a federal law on sex offender registration, finding that Congress did not delegate too much power to the attorney general to establish the statute’s regulations.

The long-awaited ruling in Gundy v. United States sidestepped a full examination of the nondelegation doctrine, which limits the ability of Congress to delegate its legislative powers to executive branch agencies.