Over two dissenting votes, the justices acted on an emergency appeal from lawyers for Venezuelan men who have been accused of being gang members.