WASHINGTON — President Joe Biden won a victory at the Supreme Court on Thursday. He was able to stop a Trump-era program that restricted immigration at the southern border.

In a 5-4 decision, the court ruled that the Biden administration had acted correctly in ending the “Remain in Mexico” policy, also known as the Migrant Protection Protocols. People seeking asylum at the southern border of Mexico, mostly from Central America, were required to wait in Mexico while they appealed.

Chief Justice John Roberts, writing for the majority, stated that a lower court had overstepped its bounds when it decided the policy should be maintained.

He wrote that “the court of appels’ interpretation” allowed a judge to “force the executive at the bargaining table to Mexico over a policy both countries want to end and to oversee its ongoing negotiations with Mexico to make sure they are ‘in good faith. ‘”

Roberts was joined by Justices Brett Kavanaugh and Elena Kagan, Sonia Sotomayor, and Stephen Breyer.

Justice Samuel Alito, in a strongly worded dissent criticized the border policy and stated that it was his colleagues who had erred.

DHS is unable to hold all illegal aliens crossing the border from Mexico due to the large number of them. No one believes that DHS should do what it cannot. DHS decided to forgo Congress’s clear statutory option to send inadmissible aliens back to Mexico while they are awaiting proceedings in this country. Instead, DHS may release untold numbers to this country and will likely be removed if the aliens show up for their removal hearings. This practice is contrary to the law, but Court looks the other direction,” Alito wrote in a dissent joined by Neil Gorsuch and Justice Clarence Thomas.

Justice Amy Coney Barrett, in a separate dissent said that she believed the court should not have decided the case on its merits as more information was required.

Kavanaugh concurred with Roberts in a written opinion. He noted that the Trump administration sent relatively few people back while using the policy. In general, the immigration statutes allow both the parole option or the return-to Mexico option to be used when there is not enough detention capacity. The recent history shows that every president since the late 1990s used the parole option. President Trump also used the return-to Mexico option for a small number of noncitizens,” Kavanaugh wrote.

Texas Attorney General Ken Paxton had filed suit to stop the policy being lifted. He called the ruling “unfortunate.”

Paxton stated that “Today’s decision worsens the border crisis.”

The Department of Homeland Security announced Thursday that it will end the Trump-era program as quickly as possible.

The department stated that they were happy with the Supreme Court’s affirmation that the Secretary has the discretionary power to end the program and would continue to pursue legal avenues to do so.

More than 68,000 people were escorted back to Mexico from January 2019, when Biden ended the program. Tent cities were built near the Mexican border entry points. Human rights groups claim that hundreds of asylum seekers were kidnapped and raped near border entry stations on the Mexican side.

Biden immediately ordered the end of the program shortly after he took office. Biden cited the dangers at the border, difficulties migrants had in obtaining legal help in the United States, and the problems the program created for America’s foreign policies with Mexico.

Biden immediately stopped it, but Texas sued. They claimed that Trump’s program had greatly reduced the flow of migrants to the southern border. This resulted in a decrease of 80 percent in the number of migrants from El Salvador, Guatemala, and Honduras. The states were ruled by a federal court in Texas.

U.S. District Judge Matthew Kacsmaryk of the Northern District of Texas stated that federal law requires the government to send asylum seekers back to Mexico if it is impossible to hold them or if they are unable to safely wait in the U.S. to process their claims. Judge Matthew Kacsmaryk stated that the Biden Department of Homeland Security failed to provide sufficient explanations for why it was abandoning the policy.

Kacsmaryk issued an order to stop the government from closing the program down. A federal appeals court approved, so that the Trump policy was again in force. The Supreme Court declined to allow the White House to shut down the program while it was undergoing appeals.

The Justice Department claimed that federal immigration law gives the government the power to send migrants back to Mexico while asylum claims are being considered. Or, it can allow them to stay in the U.S. on a case by case basis if they don’t pose a threat. Government lawyers stated that there is simply not enough space to hold them all due to the limited resources provided by Congress.