For more than two years, US Customs and Border Protection officials have been using Title 42, a protocol aimed at stopping the spread of Covid-19, to turn asylum seekers away.
Now, President Joe Biden's administration has said it wants to end the protocol, first enacted under former president Donald Trump.
This month, the Biden administration announced plans to end the measure — sometimes referred to as the “remain in Mexico” policy — on May 23.
Republicans and even some Democrats have criticised the decision, citing fears that it would create chaos along the southern border, and more than 20 states have asked the court to block the move.
On Monday, Judge Robert Summerhays granted the states' motion.
Mr Summerhays, who was appointed to the US District Court in Louisiana under Mr Trump, said in a court notice that “the parties will confer regarding the specific terms to be contained in the Temporary Restraining Order and attempt to reach agreement” on the issue.
“I am so proud of the lawyers from our office who just got a Temporary Restraining Order to keep Title 42 in place,” tweeted Arizona’s Attorney General Mark Brnovich.
“We will continue to fight the Biden administration's open border policies.”
Under Title 42, migrants who came to the US to seek asylum were sent back to Mexico to wait until they were called to appear in immigration court.
This process was markedly different from the previous policy, which allowed asylum seekers to stay with family in the US while they waited for their hearings.
The programme led to thousands of migrants, refugees and asylum seekers being stranded in cities throughout northern Mexico with little to no support.
US Customs and Border Protection officials detained more than 221,000 migrants along the southern border last month, the highest number in years. More than one million migrants have tried to cross the border so far this year, compared to 1.7 million in all of 2021.
The increased numbers have authorities in Mexico concerned. As more and more migrants try to enter the US through Mexico while Title 42 is still in place, officials fear yet another wave of migrants will be sent back to Mexico.
“Tijuana is becoming a bottleneck — that is, the shelters are saturated and there are no longer spaces to receive more people; they cannot be supporting many people for such a long time,” said Enrique Lucero, head of migrant services for Tijuana, a frontier city in northern Mexico that borders southern California.
About 5,000 migrants are spread out among 25 shelters in Tijuana. Conditions are cramped and resources extremely limited.
“This long time has brought despair to the migrant community and forced them to forcibly cross into the United States, risking their lives,” Mr Lucero told The National.
Advocates say life under Title 42 has been cruel and inhumane, with migrants living in sometimes conditions.
“It was a little bit difficult because actually that was like mental cruelty on the mind of the immigrants because they want to do everything legally,” Albert Rivera, who runs a shelter in Tijuana, told The National.
Mr Rivera's shelter currently houses 475 people, mostly single mothers and children, but he is expecting as many as 1,200 as May 23 approaches.
And the Russian invasion in Ukraine has only exacerbated the situation, with thousands of Ukrainians fleeing to the US.
Migrants coming from places such as Central America have complained that the US government exempted thousands of Ukrainians from the Title 42 measures.
The Supreme Court on Tuesday heard oral arguments in a Biden administration appeal of a lower court ruling reinstating the policy after Texas and Missouri sued to maintain the programme.
Liberal Justice Elena Kagan said that because the US needs Mexico's consent to send migrants there, the Texas challenge “to basically tell the executive how to implement its foreign and immigration policy … puts the United States essentially at the mercy of Mexico".