(CNN)The Supreme Court on Thursday gave President Joe Biden the green light to end the controversial "Remain in Mexico" immigration policy that originated under the Trump administration.
Since the beginning of his administration, Biden has tried to wind down the policy, which sends certain non-Mexican citizens who entered the US back to Mexico -- instead of detaining them or releasing them into the United States -- while their immigration proceedings played out.
The ruling was 5-4, and states that immigration law gives the federal government the discretion to end the program, formally known as Migrant Protection Protocols. The case will go back down to lower courts for additional proceedings around his latest attempt to end the program. A hold on Biden's bid to end the program remains in place, but Thursday's ruling suggested that that order should be lifted shortly.
Biden's bid to terminate the program had been challenged in court by a coalition of red states led by Texas that argued that ending it ran afoul of immigration law.
Biden campaigned on ending the policy and has said it "goes against everything we stand for as a nation of immigrants."
Biden has grappled with a growing number of border crossings over the course of his administration amid mass migration in the Western hemisphere.