President Donald Trump’s executive order restricting birthright citizenship is unlawful, the Supreme Court ruled Tuesday, striking down one of the president’s biggest executive orders in a major rebuke to one of his signature immigration policies.

The Supreme Court ruled 5-4 against Trump’s executive order—with Justice Brett Kavanaugh both concurring and dissenting—finding children born in the U.S. to parents who are in the country unlawfully or temporarily are granted citizenship at birth under the Constitution.

Trump issued an executive order after his inauguration that barred children born in the U.S. from automatically becoming citizens if neither of their parents is a U.S. citizen or permanent resident, though the order has never taken effect, as courts repeatedly blocked it.

The order challenged the longstanding interpretation of the 14th Amendment, which grants citizenship to “all persons born or naturalized in the United States, and subject to the jurisdiction thereof” and has historically been used to guarantee citizenship by birth in nearly all cases, except for children of foreign diplomats or enemy soldiers.

Justices struck down Trump’s interpretation that children of non-citizens or permanent residents aren’t “subject to the jurisdiction of” the U.S., ruling “there is scant evidence” to support that conclusion based on the nation’s history and the text of the Constitution.

If Congress intended to limit birthright citizenship when lawmakers wrote the 14th Amendment, “nothing in the succinct language of the Citizenship Clause conveyed that design,” Chief Justice John Roberts wrote for the court’s majority.

The White House has not yet responded to a request for comment.

“Citizenship, then and now, was the right to have rights—to freely participate in our political community. The Framers of the Fourteenth Amendment extended that promise to ‘every free-born person in this land,’” Roberts wrote in the court’s opinion Tuesday. “We keep that promise today.”

Justice Clarence Thomas criticized the court in his dissent for taking the “extraordinary step” of striking down Trump’s executive order, arguing its account of how citizenship has been handled in the past “is not historically accurate.” Neither the Civil Rights Act or the 14th Amendment “guaranteed citizenship to persons who were not domiciled in the United States,” Thomas, joined by Justice Neil Gorsuch, wrote. Justice Samuel Alito also opposed the court’s ruling in a dissent, calling it a “serious mistake” and arguing the text of the 14th Amendment “confers citizenship on only those children who, at birth, owe allegiance solely to this country.” Kavanaugh disagreed with the court’s majority that Trump’s executive order violated the 14th Amendment, but argued it did violate a separate federal statute , and Congress would have to pass legislation in order for some children to be denied citizenship.

How Trump will respond. The president has expressed particular interest in the birthright citizenship dispute and attended oral arguments in the case in April, which made him the first known sitting president to attend a Supreme Court argument. After the 6-3 conservative court ruled against Trump’s signature tariff policy, he repeatedly predicted the court would rule against him in this case as well. “A negative ruling on Birthright Citizenship, on top of the recent Supreme Court Tariff catastrophe, is not Economically sustainable for the United States of America!” Trump wrote on Truth Social in May after saying he thought the court “will be ruling against us on Birthright Citizenship.”

255,000. That’s the approximate number of children whom Trump’s order would have impacted each year, according to the Migration Policy Institute and Penn State’s Population Research Institute.

Which Other Countries Have Birthright Citizenship?

While Trump has claimed the U.S. is the only country with birthright citizenship, those claims are false, as nearly 40 other countries have policies guaranteeing citizenship to people who are born there. Countries with birthright citizenship policies are largely concentrated in North, Central and South America and include Argentina, Brazil, Chile, Canada, Ecuador, Mexico, and Venezuela, among others. Pakistan is also among highly populous countries granting birthright citizenship.

Trump has been opposed to birthright citizenship since even before his first stint in the White House, calling for an end to the policy during his first presidential campaign and saying in a 2015 speech that birthright citizenship was “over, not gonna happen.” The president never targeted birthright citizenship with any actual policies during his first term, though he continued to speak out against it and floated such a policy, but issued an executive order almost immediately after his second inauguration. The order never took effect before being repeatedly blocked in court. The Supreme Court’s ruling comes after justices weighed in on the policy debate last term, issuing a decision in response to lower court rulings blocking the executive order. That decision said lower court judges cannot issue sweeping rulings that block policies nationwide beyond their jurisdictions, but did not deal with the actual substance of the birthright citizenship policy.

Supreme Court Upholds Birthright Citizenship—Which Trump Campaigned Against For Over A Decade (Forbes)

Key Supreme Court Justices Skeptical Of Trump’s Limits On Birthright Citizenship—Which Trump Blasts After Hearing (Forbes)