(Bloomberg) -- The U.S. will likely reinstate a Trump-era policy by mid-November requiring asylum seekers who cross the southern border to return to Mexico, the Biden administration told a federal judge.

The Department of Homeland Security has made “substantial progress” toward restarting the Migrant Protection Protocols, which force asylum seekers from Central and South America to wait in Mexico for their cases to be resolved, the Justice Department said in a filing Friday in federal court in Amarillo, Texas.

The time frame hinges on Mexico, which has concerns about how the policy was implemented previously and is seeking assurances asylum seekers will get speedy hearings and access to counsel, and that “particularly vulnerable populations” won’t be returned to Mexico, the U.S. said. MPP resulted in thousands of asylum seekers waiting in camps in Mexico, leading to dangerous and unsanitary conditions.

Read More: Biden Asks Court to Let Him Scrap Trump’s Remain-in-Mexico Rule

The Biden administration tried to scrap the policy put in place by former president Donald Trump, but a judge in August ordered DHS to restart the program after Texas and Missouri sued. Since then, the states have accused the administration of dragging its feet.

The legal dispute is playing out as hundreds of thousands of people from Central America and elsewhere have surged across the U.S. border in recent months and detentions of migrants have soared. Republicans say the crisis is evidence that Trump’s policies worked, while the Biden administration argues the “Remain in Mexico” rule is doing more harm than good.

“DHS cannot implement MPP without Mexico’s independent decision to accept individuals that the United States seeks to send to Mexico,” the U.S. said in the filing. “As a sovereign nation, Mexico can deny the entry of all individuals who do not have status in Mexico.”

Read More: Texas Sues Over Biden Scrapping Trump’s Stay-in-Mexico Rule 

The ongoing discussions with Mexico include details of where and what time entries from asylum seekers will be permitted, how many people will be allowed to cross the border into Mexico per day, and which nationalities will be accepted, according to the filing. Mexico wants assurances that asylum cases will generally take no more than about six months and that people awaiting court hearings in Mexico will “receive timely and accurate information about hearing dates and times,” according to the filing.

The case is Texas v. Biden, 21-cv-00067, U.S. District Court, Northern District of Texas (Amarillo).

©2021 Bloomberg L.P.