Title 42, a pandemic-era policy used by both presidents Donald Trump and Joe Biden as a means of stopping migrants from entering the US, is set to expire on Thursday.
The protocol, which was aimed at slowing the spread of Covid-19 by turning asylum seekers away from the border with Mexico, was first crafted in 1944 to help prevent the spread of influenza.
The law has been used more than 2.5 million times to expel migrants since the Covid-19 pandemic started, although that number includes people who have repeatedly tried to cross the border.
It was first enacted in March 2020 under Mr Trump.
Why could the law be ending soon?
The Covid-19 Emergency Declaration officially expires on May 11 and with it, too, will Title 42.
The Biden administration decided in January to let the declaration wind down on Thursday, a move supported by the World Health Organisation's recent decision to no longer consider Covid-19 a global health emergency.
Mr Biden's administration has long said it wanted to do away with the restrictions but has been stymied by conservative lawmakers in the past.
In December, US Supreme Court Chief Justice John Roberts, at the request of Republican officials in 19 states, temporarily blocked the Biden administration from ending the policy.
Republicans warned the law's end would lead to a surge in migrants crossing the border.
The US Centres for Disease Control and Prevention announced in April last year that Title 42 was no longer needed to limit the spread of Covid-19 in light of vaccines and other medical advances.
But a federal judge in Louisiana blocked the termination after a legal challenge by a group of two dozen US states with Republican attorneys general, who said increased migration would burden them with costs.
In another lawsuit, brought by the American Civil Liberties Union and other groups on behalf of migrant families who say they were harmed by Title 42, a Washington judge struck down Title 42 on November 15.
The judge ruled that it breached federal regulatory law but delayed the effective date of his decision until December 21 to give authorities time to prepare.
But things were thrown into disarray again when Mr Roberts later temporarily forced the order to remain in effect.
Some public health experts, Democrats and advocates had criticised the order, saying it unlawfully blocked migrants from claiming asylum and subjected them to dangers including kidnapping and assault in Mexico.
It is not immediately clear what will happen once Title 42 expires.
Biden administration officials have insisted that the end of the measure will not mean that the border is open, simply that the regular law for asylum applications to be processed will go back into effect.
Republicans voiced their intent on making immigration a key issue when they took control of the House of Representatives earlier this year.
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.
The previous policy 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 or no support.
As more and more migrants tried to enter the US through Mexico while Title 42 was still in place, conditions grew increasingly grim.
“Tijuana is becoming a bottleneck — that is, the shelters are saturated and there are no longer spaces to receive more people,” said Enrique Lucero, head of migrant services for Tijuana, across the border from southern California.
“They cannot be supporting many people for such a long time.”
About 5,000 migrants are spread 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 on a trip to the border town this year.
Advocates say life under Title 42 has been cruel and inhumane.
“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 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.
Agencies contributed to this report