Updated

A federal district court judge in the 9th Circuit on Monday issued a preliminary injunction blocking the Trump administration's new policy of returning asylum seekers to Mexico as they wait for an immigration court to hear their cases, but the order won't immediately go into effect.

The so-called "Remain in Mexico" policy was one of the primary innovations of former Homeland Security Secretary Kirstjen Nielsen, whom President Trump announced on Sunday "will be leaving her position" after 16 months in the job.

Judge Richard Seeborg in San Francisco granted a request by civil liberties groups to halt the practice while their lawsuit moves forward. He put the decision on hold until Friday to give U.S. officials the chance to appeal to the 9th Circuit Court of Appeals -- which, thanks to Trump's aggressive judicial appointments, is now more friendly to conservatives than it has been in more than three decades.

The launch of the policy in January in San Diego at the nation's busiest border crossing marked an unprecedented change to the U.S. asylum system, government officials and asylum experts said. Families seeking asylum typically had been released in the U.S. with notices to appear in court -- and, conservatives have charged, they often can't be relied upon to show up.

The American Civil Liberties Union, Southern Poverty Law Center, and Center for Gender & Refugee Studies, which brought the lawsuit on behalf of 11 asylum applicants and several other organizations, praised the ruling in a statement Monday.

“The court strongly rejected the Trump administration’s unprecedented and illegal policy of forcing asylum seekers to return to Mexico without hearing their claims," Judy Rabinovitz, deputy director of the ACLU’s Immigrants’ Rights Project, said in a statement. "Try as it may, the Trump administration cannot simply ignore our laws in order to accomplish its goal of preventing people from seeking asylum in the United States.”

FILE - In this Dec. 11, 2018 file photo, an asylum-seeking boy from Central America runs down a hallway after arriving from an immigration detention center to a shelter in San Diego. San Diego County sued Wednesday, April 3, 2019, to overturn the Trump administration's cancelling of an immigration program that quickly released families after they cross the border without allowing time for travel arrangements. (AP Photo/Gregory Bull, File)

FILE - In this Dec. 11, 2018 file photo, an asylum-seeking boy from Central America runs down a hallway after arriving from an immigration detention center to a shelter in San Diego. San Diego County sued Wednesday, April 3, 2019, to overturn the Trump administration's cancelling of an immigration program that quickly released families after they cross the border without allowing time for travel arrangements. (AP Photo/Gregory Bull, File)

The Trump administration says the policy responds to a crisis at the southern border that has overwhelmed the ability of immigration officials to detain migrants. Growing numbers of families are fleeing poverty and gang violence in Guatemala, Honduras and El Salvador.

Last year, the Justice Department eliminated gang violence and domestic abuse as a possible justification for seeking asylum.

TRUMP TRANSFORMS 9TH CIRCUIT COURT OF APPEALS, WITH NEARLY HALF OF JUDGES NOW APPOINTED BY REPUBLICANS

Trump, earlier this week, flatly stated that the "the asylum program is a scam," often abused by thousands of migrants with phony stories hoping to take advantage of U.S. law.

Asylum law, conservatives point out, is intended to shield individuals from near-certain death or persecution on account of limited factors like religious or political affiliation -- not poor living conditions and economic despair.

Most asylum applicants are ultimately rejected for having an insufficient or unfounded personalized fear of persecution, following a full hearing of their case before an asylum officer or immigration judge.

"Some of the roughest people you have ever seen," Trump said, referring to some fraudulent asylum applicants. "People that look like they should be fighting for the UFC."

The lawsuit on behalf of 11 asylum seekers from Central America and legal advocacy groups says the Trump administration is violating U.S. law by failing to adequately evaluate the dangers that migrants face in Mexico.

It also accuses Homeland Security and immigration officials of depriving migrants of their right to apply for asylum by making it difficult or impossible for them to do so.

WEEKS AGO: 9TH CIRCUIT RULES THAT ASYLUM APPLICANT HAS RIGHT TO GO BEFORE JUDGE, BREAKING RANKS WITH ANOTHER COURT

Under the new policy, asylum seekers are not guaranteed interpreters or lawyers and don't get to argue to a judge that they face the potential of persecution or torture if they are sent back to Mexico, Judy Rabinovitz, an attorney for the American Civil Liberties Union, said at a March court hearing.

Seeborg appeared skeptical of the lawsuit's argument that the administration misapplied a U.S. law that allows the return of immigrants to Mexico. The ACLU and other groups that are suing say that law does not apply to asylum seekers who cross the border illegally or arrive at a border crossing without proper documents.

The judge also questioned the Justice Department's argument that asylum seekers sent back to Mexico are not eligible for certain protections, such as a hearing before an immigration judge.

FILE - In this Feb. 5, 2019, file photo, Border Patrol agent Vincent Pirro looks on near where a border wall ends that separates the cities of Tijuana, Mexico, left, and San Diego, in San Diego. The government is working on replacing and adding fencing in various locations, and Trump in February declared a national emergency to get more funding for the wall. (AP Photo/Gregory Bull, File)

FILE - In this Feb. 5, 2019, file photo, Border Patrol agent Vincent Pirro looks on near where a border wall ends that separates the cities of Tijuana, Mexico, left, and San Diego, in San Diego. The government is working on replacing and adding fencing in various locations, and Trump in February declared a national emergency to get more funding for the wall. (AP Photo/Gregory Bull, File)

The administration hopes that making asylum seekers wait in Mexico will discourage weak claims and help reduce an immigration court backlog of more than 800,000 cases.

Justice Department attorney Scott Stewart said there is a process to protect immigrants who could face harm in Mexico. All 11 plaintiffs in the lawsuit are represented by attorneys, and 10 already have appeared for court proceedings, he said.

Border Patrol arrests, the most widely used gauge of illegal crossings, have risen sharply over the last year but are relatively low in historical terms after hitting a 46-year low in 2017.

TRUMP: 'DISGRACEFUL' 9TH CIRCUIT WOULD OVERTURN MY THANKSGIVING TURKEY PARDON IF IT COULD

The launch of the policy followed months of delicate talks between the U.S. and Mexico. Mexicans and children traveling alone are exempt from it.

The long-liberal 9th Circuit, which has a sweeping purview over nine western states, has long been a thorn in the side of the Trump administration. Just weeks ago, the 9th Circuit broke ranks with another federal appellate court and ruled that a Sri Lankan man who failed his initial asylum screening had the constitutional right to go before a judge -- threatening to clog the immigration court system further with tens of thousands of similar claims per year and setting up an all-but-certain Supreme Court showdown.

Fox News' Andrew O'Reilly and The Associated Press contributed to this report.