(Reuters) - The U.S. Supreme Court on Wednesday granted a request by President Donald Trump’s administration to fully enforce a new rule that would curtail asylum applications by immigrants at the U.S.-Mexico border, a key element of his hardline immigration policies.

The court said the rule, which requires most immigrants who want asylum to first seek safe haven in a third country through which they traveled on their way to the United States, could go into effect as litigation challenging its legality continues.

Among the nine judges on the court, liberal Justices Sonia Sotomayor and Ruth Bader Ginsburg dissented.

The court’s ruling handed a victory to Trump at a time when much of his immigration agenda had been struck down by lower courts. “BIG United States Supreme Court WIN for the Border on Asylum!” Trump said on Twitter.

The rule would bar almost all immigrants from applying for asylum at the southern border. It represents the latest effort by Trump’s administration to crack down on immigration, a signature issue during his presidency and 2020 re-election bid.

The American Civil Liberties Union and others who challenged the administration’s policy in federal court said it violates U.S. immigration law and accused the administration of failing to follow the correct legal process in issuing the rule, which was unveiled on July 15.

In her dissent, Sotomayor said that the government’s rule may be in significant tension with the asylum statute.

“It is especially concerning, moreover, that the rule the government promulgated topples decades of settled asylum practices and affects some of the most vulnerable people in the Western Hemisphere — without affording the public a chance to weigh in.”

Eight days after the rule went into effect in July, California-based U.S. District Judge Jon Tigar issued a nationwide injunction blocking it.

Then began a back-and-forth between Tigar and the 9th Circuit, which scaled back the injunction so that the Trump rule was blocked in the border states of California and Arizona while in effect in Texas and New Mexico.

Tigar ruled to restore the nationwide ban on Monday, but the 9th Circuit scaled it back again on Tuesday night.

They were both trumped by Supreme Court, which will allow the asylum restriction to remain in place until the underlying legality of the rule is determined at trial.

“This is just a temporary step, and we’re hopeful we’ll prevail at the end of the day,” ACLU attorney Lee Gelernt said. “The lives of thousands of families are at stake.”

Slideshow ( 4 images )

The Republican president’s administration issued the rule in an attempt to reduce the surging number of asylum claims primarily by Central American migrants who have crossed the U.S.-Mexico border in large numbers during his presidency.

The rule would block nearly all families and individuals from countries like El Salvador, Honduras and Guatemala from entering the United States as asylum seekers after crossing through Mexico. The rule would keep asylum protections for Mexican citizens.

White House spokesman Hogan Gidley said the Trump administration was “pleased” by the Supreme Court’s decision, which he said rejected an “erroneous” ruling by the lower court judge.

Slideshow ( 4 images )

But Jerrold Nadler, the Democratic chairman of the U.S. House of Representatives’ Judiciary Committee, and Zoe Lofgren, the head of the judiciary panel’s immigration subcommittee, called the court’s decision disappointing.

“Lives will be lost. This rule will result in those fleeing fear and persecution to be turned away at our doorstep and will only exacerbate the humanitarian crisis in the region,” they said in a statement.

GOVERNMENT ARGUED RIGHT TO SET POLICY

The rule drew legal challenges including from a coalition of groups represented by the ACLU who accused the administration of pursuing an “asylum ban” and jeopardizing the safety of migrants fleeing persecution.

In the administration’s request to fully enforce the rule, U.S. Solicitor General Noel Francisco asked the Supreme Court to issue a stay blocking the injunction while litigation over the issue proceeds because the judge’s order interferes with the government’s authority to establish immigration policy.

The administration said the rule screens out asylum claims that are unlikely to succeed and “deters aliens without a genuine need for asylum from making the arduous and potentially dangerous journey from Central America to the United States.”