The Supreme Court on Tuesday wiped out President Donald Trump’s executive order seeking to redefine birthright citizenship, an effort to restrict American citizenship without Congress that cut against more than a century of legal precedent.

The 6-3 decision, with Chief Justice John G. Roberts Jr. writing a five-justice majority opinion, backed a challenge to the order, which would disallow citizenship for children born in the United States to undocumented immigrant parents or those with temporary legal status.

Roberts wrote that the 14th Amendment to the Constitution granted birthright citizenship to anyone born in the United States.

“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. “We keep that promise today.”

States and others challenging the executive order have said in court filings that it could strip citizenship from hundreds of thousands of children each year. Experts said the ruling could confine Congress’ power to define who is considered part of the nation.