According to US officials, the Biden administration has reached an agreement with Mexico to reinstate a Trump-era border policy that requires asylum seekers to wait in Mexico for hearings in US immigration court beginning next week.

The revival of the “Remain in Mexico” policy is subject to a court order, even as the administration attempts to end it in a way that will withstand legal scrutiny. President Joe Biden canceled the policy, but a lawsuit filed by Texas and Missouri forced him to reinstate it.

Around 70,000 asylum seekers have been affected by the policy, which was implemented by President Donald Trump in January 2019 and was suspended by Biden on his first day in office.

Illegal border crossings fell sharply after Mexico agreed to the policy’s rapid expansion in 2019 in response to Trump’s threat of higher tariffs. While waiting in Mexico, asylum seekers were subjected to severe violence and faced a slew of legal challenges, including limited access to attorneys and case information.

Migrants are expected to be repatriated beginning Monday in one border city and shortly thereafter in three others. They are San Diego crossings as well as Texas crossings in El Paso, Laredo, and Brownsville. The order has not yet been determined.

The announcement on Thursday comes after intense bilateral talks between the United States and Mexico after U.S. District Judge Matthew Kacsmaryk, a Trump appointee in Amarillo, Texas, ordered the policy to be reinstated, subject to Mexico’s participation.

The policy’s new iteration, outlined for reporters by administration officials who spoke on the condition of anonymity, includes significant additions and changes demanded by Mexico. All migrants covered by the policy will be immunized against COVID-19. Adults will receive the Johnson & Johnson vaccine, which only requires one shot. Children who are eligible under US guidelines will receive the Pfizer shot, followed by a second shot when they arrive in the US for their initial hearings.

The United States will make every effort to complete cases within 180 days. The Justice Department has assigned 22 immigration judges to work solely on these cases.

Instead of relying on migrants to raise concerns unprompted, US authorities will ask them if they are concerned about being returned to Mexico. If they express fear, they will be screened and given a 24-hour window in which to find an attorney or representative.

The Biden administration is working to ensure the safety of migrants as they travel to and from court, including within Mexico. Migrants returning from Laredo and Brownsville, which are particularly dangerous Mexican border cities, will be moved to locations further into Mexico.

Migrants from the Western Hemisphere will be eligible. Officials in the United States have not stated how many will be processed each day. Another Trump-era policy remains in place, allowing the administration to deport Central Americans to Mexico in order to prevent the spread of COVID-19.

Before each hearing, migrants will have the opportunity to meet with attorneys. The State Department is collaborating with Mexico to identify locations for video and phone access to attorneys in the United States. Many of these characteristics are similar to those outlined by Mexico.

It also stated that “vulnerable” people, such as unaccompanied minors, pregnant women, physically or mentally ill people, the elderly, indigenous people, and members of the LGBTQ community, should be exempt.

Mexico said it was seeking funding from the United States for shelters and other organizations in order to significantly increase support for migrants waiting in Mexico.