The Supreme Court divided 5-4, with Chief Justice John Roberts and Justice Brett Kavanaugh joining the three liberal justices in the majority.