The United States Supreme Court has voted 5-3 to overturn the bulk of Arizona’s controversial immigration law, ruling that many of its provisions are preempted by federal immigration law. In particular, the court has overturned the state-level requirement that aliens carry registration papers, the state-level prohibition on illegal immigrants seeking work, and the requirement that police stop and arrest anybody they suspect of being an illegal immigrant.

The court did, however, uphold the law’s requirement that police officers verify the immigration status of anybody lawfully detained for other reasons when there is ‘reasonable suspicion’ that the detained person is in the U.S. illegally. Also notable, many of the law’s provisions—the requirement that aliens carry registration papers, for example—simply mirror federal immigration laws which remain in-place.

At issue in this case was the doctrine of federal preemption. Immigration policy clearly falls under the federal government’s constitutional authorities, but it was unclear whether states had the authority to enforce federal immigration policy on their own when federal authorities failed to do so, or whether they had the authority to enact their own, stricter immigration policies within their own borders. This ruling strictly limits state authorities and places immigration matters almost wholly in the federal sphere.

The majority opinion was issued by Justice Anthony Kennedy, joined by Chief Justice John Roberts, Justice Ruth Bader Ginsburg, Justice Stephen Breyer, and Justice Sonia Sotomayor. Separate opinions were issued by Justice Antonin Scalia, Justice Clarence Thomas, and Justice Samuel Alito that concurred and dissented with different parts of the majority opinion. Justice Elana Kagan recused herself from participation due to her involvement in the case as Solicitor General under President Barack Obama (D) before being appointed to the court.