SAN FRANCISCO (AP) — A U.S. judge in San Francisco has blocked the Trump administration’s policy of returning asylum seekers to Mexico as they wait for a court to hear their cases, but the order won’t immediately go into effect.

Judge Richard Seeborg on Monday granted a request by civil liberties groups to halt the practice while their lawsuit moves forward. The decision is on hold until Friday to give U.S. officials the chance to appeal.

Children part of the Central American migrants caravan, play on the street, while camping near a closed temporary shelter a few meters from the US-Mexico border in Tijuana, Baja California State, Mexico, December 4, 2018. (credit: Guillermo Arias/AFP/Getty Images)

The groups say the policy violates U.S. law by failing to adequately evaluate the dangers that migrants face in Mexico.

President Donald Trump’s administration says the policy responds to a crisis at the southern border that has overwhelmed the ability of immigration officials to detain migrants.

The launch of the practice in January marked an unprecedented change to the U.S. asylum system.