WASHINGTON (AP) — The Supreme Court grappled Tuesday with whether the Trump administration should be able to revive an immigration policy that has been used to turn back migrants seeking asylum at the U.S.-Mexico border.

Some conservative justices seemed receptive to the Justice Department’s push to overturn a lower-court ruling against the practice known as metering. Immigration authorities limited the number of people who could apply for asylum, saying it was necessary to handle an increase at the border.

Advocates say the policy created a humanitarian crisis during President Donald Trump’s first term as people who were turned away settled in makeshift camps in Mexico as they waited for a chance to seek asylum.

The policy isn’t in place now, and Trump ordered a wider suspension of the asylum system at the start of his second term.

The administration, though, argues that metering remains a critical tool used under administrations from both parties, and should be available if necessary in the future.

While some justices seemed open to that argument, others raised questions about whether the policy would allow people who entered the country illegally to apply for asylum while new arrivals seeking legal entry at the border could be blocked.

“Why would Congress privilege someone who illegally enters the United States?” Justice Brett Kavanaugh asked. An attorney for the Trump administration maintained that people turned away one day could potentially come back later.

The Justice Department argues it means anyone who is in the United States already, so it doesn’t apply to people authorities stop on the Mexico side of the border. But immigration attorneys say the law has long meant anyone who comes to a port of entry must be able to apply, and it should stay that way.

Chief Justice John Roberts peppered an attorney for the migrants with questions on exactly where someone must be to claim asylum. But Justice Ketanji Brown Jackson suggested that those questions are hard to answer when the policy isn’t being used.

Metering was first used during President Barack Obama’s administration when large numbers of Haitians appeared at the primary crossing to San Diego from Tijuana, Mexico. It was expanded to all border crossings from Mexico during Trump’s first term in the White House.

The practice ended in 2020 when the coronavirus pandemic led the government to greater restrictions on asylum-seekers. President Joe Biden formally rescinded the use of metering in 2021.

Also that year, U.S. District Judge Cynthia Bashant, an Obama nominee, ruled that metering violated the migrants’ constitutional rights and a federal law requiring officials to screen anyone who arrives at the border seeking asylum.

People seeking refuge in the U.S. are able to apply for asylum once they are on American soil, regardless of whether they came legally. To qualify, they have to show a fear of persecution in their own country due to specific reasons, such as their race, religion, nationality, membership in a particular social group, or political opinion.

Once people are granted asylum, they can’t be deported. They can legally work, bring immediate family into the country, apply for legal residency, and eventually seek U.S. citizenship.