The U.S. Supreme Court ruled Thursday that migrants standing on the Mexican side of the border have no legal entitlement to apply for asylum in the United States.

The 6-3 decision clears the path for the Trump administration to resume a policy allowing federal agents to turn back asylum seekers before they physically enter the country.

The case turned on the interpretation of federal law stating that a person may apply for asylum if they are “physically present in the United States” or if the person “arrives in the United States.”

Justice Samuel Alito authored the majority opinion, joined by the five other conservative justices, concluding that an asylum seeker standing in Mexico has not yet arrived in the United States under any ordinary reading of the law.

“In ordinary speech, no one would say that a person ‘arrives in’ a place — for example, a house, a city, or a country — before the person enters that place,” Alito wrote in the majority opinion.

Alito further wrote that “an alien who is standing in Mexico does not ‘arriv[e] in the United States’ by attempting, and failing, to set foot in this country,” and that crossing the border is the only qualifying act.

The court’s three liberal justices dissented, with Justice Sonia Sotomayor reading her dissent aloud from the bench, a step the justices reserve for cases where they wish to signal particularly strong disagreement.

Sotomayor argued that Congress has required immigration officers to inspect noncitizens arriving at ports of entry since 1917, writing that “this system is designed to ensure that the Government processes each person seeking to come into the United States.”

Sotomayor also disputed the majority’s reasoning on what it means to arrive, writing that “it is natural to say that asylum seekers are arriving, i.e., reaching their destination, when they come to the threshold of a port of entry.”

She further argued that the so-called metering policy “had little to do with capacity issues,” citing a whistleblower report alleging the policy was used as a pretext to turn away migrants who would otherwise have made asylum claims.

Sotomayor blamed metering for creating what she described as “dire humanitarian conditions at the border,” leaving migrants from across the world vulnerable while camped at crossing points waiting to be processed.

The case, known as Noem v. Al Otro Lado, centers on a policy that the Trump administration calls a “critical tool for addressing” surges in immigration, while the immigrant rights group challenging it argues it created “a humanitarian crisis in Mexico.”

The Obama administration first attempted a similar policy to limit the flow of asylum seekers, but lower courts blocked it on the grounds that it violated federal law by denying asylum to people who would otherwise have qualified.

Under the government’s turnback policy, U.S. Customs and Border Protection officials turned asylum seekers back into Mexico, with some migrants waiting years at the border in dangerous conditions and falling victim to violence, kidnapping, and assault.