With President Donald Trump attending, Supreme Court justices posed tough questions about the legality of his directive to restrict birthright citizenship in the U.S., a contentious part of his efforts to curb immigration that would upend long-held understanding of a key constitutional provision.

Some of the justices including conservative Chief Justice John Roberts grilled the Justice Department lawyer defending Trump’s action. Trump, wearing a red tie and dark suit, was sitting in the front row of the public gallery of the ornate courtroom.

The justices were hearing the Trump administration’s appeal of a lower court’s decision that blocked his executive order directing U.S. agencies not to recognize the citizenship of children born in the United States if neither parent is an American citizen or legal permanent resident, also called a “green card” holder.

Trump became the first sitting president to attend an oral argument at the Supreme Court, according to Clare Cushman, the resident historian at the Supreme Court Historical Society.

‘PRICELESS AND PROFOUND GIFT’

U.S. Solicitor General D. John Sauer, representing the administration, opened the arguments by saying that “unrestricted birthright citizenship contradicts the practice of the overwhelming majority of modern nations.”

“It demeans the priceless and profound gift of American citizenship,” Sauer said. “It operates as a powerful pull factor for illegal immigration and rewards illegal aliens who not only violate the immigration laws but also jump in front of those who follow the rules.”

Trump’s directive issued last year violated citizenship language in the U.S. Constitution’s 14th Amendment as well as a federal law codifying birthright citizenship rights, the lower court found, acting in a class-action lawsuit by parents and children whose citizenship is threatened by the directive.

The 14th Amendment has long been interpreted as guaranteeing citizenship for babies born in the United States, with only narrow exceptions such as the children of foreign diplomats or members of an enemy occupying force.

The provision at issue, known as the Citizenship Clause, states: “All persons born or naturalized in the United States, and subject to the jurisdiction thereof, are citizens of the United States and of the state wherein they reside.”

Roberts told Sauer that his arguments that would limit who qualifies for citizenship at birth based on the 14th Amendment language “subject to the jurisdiction thereof” seemed “quirky.”

Noting that historically this phrase excluded the children of ambassadors or enemies during a hostile invasion, Roberts said Sauer is trying to expand those examples to everyone in the U.S. illegally.

“I’m not quite sure how you can get to that big group from such tiny and sort of idiosyncratic examples,” Roberts said.

Liberal Justice Sonia Sotomayor asked Sauer about historical records that shed light on the debate around the adoption of the 14th Amendment and the Civil Rights Act of 1866. Sotomayor said the congressional record makes clear that the Trump administration’s legal theory was rejected at the time those measures were adopted.

“What do we do with those debates and the fact the proponents of both acts said everyone born in the U.S. will be citizens?” Sotomayor asked.

Sauer disputed that view of U.S. history, saying there was a “common understanding that sojourners do not have children who become citizens.”

The 14th Amendment was ratified in 1868 in the aftermath of the Civil War of 1861-1865 that ended slavery in the United States, and overturned a notorious 1857 Supreme Court decision that had declared that people of African descent could never be U.S. citizens.

The administration has said that granting citizenship to virtually anyone born on U.S. soil has created incentives for illegal immigration and led to “birth tourism,” by which foreigners travel to the United States to give birth and secure citizenship for their children.

Liberal Justice Elena Kagan said the administration’s interpretation of the 14th Amendment is not supported by the actual text of that provision.

“You’re using some pretty obscure sources to get to this concept,” Kagan told Sauer.

Sauer replied that the Trump administration’s interpretation was endorsed by Illinois Senator Lyman Trumbull, a leading champion of anti-slavery efforts in the 1860s.

PAST PRESIDENTS

There are examples of 19th century presidents arguing cases before the court – though not while in office – including John Quincy Adams, Grover Cleveland and Benjamin Harrison. William Howard Taft, who served as president from 1909 to 1913, later became the chief justice on the Supreme Court.

Groups of demonstrators gathered outside the courthouse, some holding anti-Trump signs reading “Trump must go now” and “hands off birthright citizenship.” Attorney General Pam Bondi traveled with Trump in his motorcade to the Supreme Court.

Trump has repeatedly criticized certain members of the court since it struck down on February 20 the sweeping global tariffs he imposed last year under a law meant for national emergencies, going so far as to say he was “sickened” by two justices he appointed during his first term – Neil Gorsuch and Amy Coney Barrett – and called them “an embarrassment to their families.”

Limiting who qualifies for citizenship at birth is a top priority for the Republican president, who issued the order last year on his first day back in office as part of a suite of policies to crack down on legal and illegal immigration. Critics have accused him of racial and religious discrimination in his approach to immigration.

The administration has asserted that the phrase “subject to the jurisdiction thereof” means that being born in the United States is not enough for citizenship, and excludes the babies of immigrants who are in the country illegally or whose presence is lawful but temporary, such as university students or those on work visas.

Citizenship is granted only to the children of those whose “primary allegiance” is to the United States, including citizens and permanent residents, the administration has argued. Such allegiance is established through “lawful domicile,” which lawyers for the administration define as “lawful, permanent residence within a nation, with intent to remain.”

The challengers have said the Supreme Court already settled the question of birthright citizenship in an 1898 case called United States v. Wong Kim Ark, which recognized that the 14th Amendment grants citizenship by birth on U.S. soil, including to the children of foreign nationals.

Kagan told Sauer that the Trump administration’s position is not compatible with that 1898 precedent.

The Supreme Court is expected to rule by the end of June.

FAR-REACHING EFFECTS

An eventual ruling by the Supreme Court endorsing the administration’s view could affect the legal status of as many as 250,000 ‌babies born each year, according to some estimates, and require the families of millions more to prove the citizenship status of their newborns.

Conservative Justice Samuel Alito said the authors of the 14th Amendment could not have conceived of modern-day immigration patterns.

“What we are dealing with here is something that was basically unknown at the time when the 14th Amendment was adopted, which was illegal immigration,” Alito said.

Sauer agreed that illegal immigration did not exist at the time, but said “the problem of temporary visitors did exist.”

Historical records show that “commentators going from 1881 until 1922 are uniformly saying that children of temporary visitors are not included” in birthright citizenship, Sauer asserted.

Concord, New Hampshire-based U.S. District Judge Joseph Laplante last July let the challenge to Trump’s order by these plaintiffs proceed as a class, allowing the policy to be blocked nationwide.

The administration contends that the 1898 precedent supports Trump’s order because, according to the court’s ruling in that case, at the time of his birth, Wong Kim Ark’s parents had permanent domicile and residence in the United States.

The court last year gave Trump an initial victory in the birthright citizenship context in a ruling ​restricting the power of federal judges to curb presidential policies nationwide.

The court, which has a 6-3 conservative majority, has backed Trump on other major immigration-related policies since he returned to the presidency. It let Trump expand mass deportation measures on an interim basis while legal challenges play out, such as ending humanitarian protections for migrants or allowing them to be deported to countries where they have no ties.