TIJUANA, MEXICO - NOVEMBER 24: Members of the 'migrant caravan' wait in line to receive breakfast outside a temporary shelter set up for members of the caravan on November 24, 2018 in Tijuana, Mexico. Around 6,000 migrants from Central America have arrived in the city with the mayor of Tijuana declaring the situation a 'humanitarian crisis'. Most migrants in the caravan say they plan to petition for asylum in the U.S. The incoming government in Mexico will reportedly support a new Trump administration policy requiring migrants asking for asylum in the U.S. to remain in Mexico while their cases are processed.  (Photo by Mario Tama/Getty Images)
Washington CNN  — 

A federal judge in California blocked the Trump administration’s policy of returning some asylum seekers to Mexico to await their immigration court hearing, delivering a major blow to the administration just a day after the Department of Homeland Security Secretary Kirstjen Nielsen was forced to resign.

The preliminary injunction from Richard Seeborg of the Northern District of California is slated to go into effect nationwide on April 12.

The Migrant Protection Protocols program, informally known as “Remain in Mexico,” was initially rolled out at the San Ysidro port of entry in January. Nielsen recently ordered that the policy be expanded along the southern border in an attempt to stem the flow of migrants to the border. Up to 400 people have been returned to Mexico under the policy, according to a DHS official.

READ: Judge’s order blocking ‘remain in Mexico’ policy

Seeborg found that the provision on which the government was relying was never intended to permit the return of asylum seekers to Mexico, and even if it did, the current screening procedures were not adequate, Melissa Crow, senior supervising attorney at the Southern Poverty Law Center, said in a statement.

“Today’s victory is especially important amidst reports that the Trump administration is planning to move toward even more extreme immigration policies,” Crow said. “The decision will prevent incredibly vulnerable individuals from being trapped in dangerous conditions in Mexico, but it’s only a step in a much larger fight.”

The White House immediately criticized the ruling.

“A liberal activist judge in San Francisco ruled the United States and Mexico can’t work together to address asylum issues at the border. It’s sad that Mexico is now doing more to secure our border than Democrats - President Trump will do whatever it takes to keep Americans safe,” said White House press secretary Sarah Sanders on Twitter.

Trump has fumed over the legal challenges that have kept his administration from implementing a series of controversial policies. It’s almost become so common that Trump publicly griped about the challenges his national emergency declaration would face.

“We will have a national emergency and we will then be sued,” Trump said in the Rose Garden in February. “We’ll possibly get a bad ruling, and then we’ll get another bad ruling, and then we’ll end up at the Supreme Court and hopefully we’ll get a fair shake.”

A judge also blocked the administration’s “zero tolerance” immigration policy that resulted in the separation of parents and children. Senior administration officials told CNN that in the last four months or so, the President has been pushing Nielsen to enforce a stricter and more widespread “zero tolerance” immigration policy.

In February, a coalition of immigrant advocacy groups asked a federal judge for a restraining order that would block the so-called Remain in Mexico policy.

Eleven migrants who are seeking asylum in the United States and were returned to Mexico under the policy are also plaintiffs in the case. If the ruling takes effect, the government will have two days to allow those 11 migrants into the US.

Some have already attended their first hearing in removal proceedings at the San Diego immigration court. The immigration hearings underway so far have underscored outstanding issues with the new program, including the challenge of obtaining legal representation while in another country and providing notification of court dates to an individual without a fixed address.

The Justice Department did not immediately respond to a request for comment.