A federal judge on Wednesday ordered the Trump administration to temporarily halt its plan to end a special federal immigration program that has allowed hundreds of thousands of immigrants to legally live and work in the U.S. for decades.

The preliminary injunction ordered by U.S. District Judge Edward Chen would affect an estimated 300,000 immigrants from Haiti, El Salvador, Honduras and Sudan. These immigrants were granted permission to be in the U.S. under the Temporary Protected Status program, better known as TPS. The humanitarian program was created in 1990 to help immigrants from countries that suffered war or major natural disasters.

The Department of Homeland Security, which manages TPS, has argued that conditions in those four countries are now suitable for thousands of their residents to return home.

But the northern California federal judge disagreed with the administration and sided — at least for now — with the plaintiffs. He’s set a hearing for Oct. 26.

“The government has failed to establish any real harm were the status quo (which has been in existence for as long as two decades) is maintained during the pendency of this litigation,” he wrote in his 43-page decision. He wrote that uprooting and removing “hundreds of thousands of TPS beneficiaries” would hurt local communities in the U.S. and abroad, and break up hundreds of thousands of families.

TPS holders are “faced with a Hobson’s choice of bringing their children with them (and tearing them away from the only country and community they have known) or splitting their families apart,” the judge wrote.

He also noted that the plaintiffs raised “serious questions whether the actions taken by the Acting Secretary or Secretary was influenced by the White House and based on animus against non-white, non-European immigrants in violation of Equal Protection guaranteed by the Constitution.”

“The issues are at least serious enough to preserve the status quo,” he wrote.

The suit against DHS was filed last March by the American Civil Liberties Union of Southern California and other immigrant advocates.

“Despite the administration’s efforts to twist the existing TPS statute, this preliminary injunction preserves its long-existing intent and avoids the deportation of more than three hundred thousand individuals to countries unfit to accommodate them and, equally importantly, prevents the separation of hundreds of thousands of U.S. citizen children from their parents,” the plaintiffs said in a statement to USA Today.

“Judge Chen’s decision reaffirms the importance of our judicial system and the checks and balances in place to hold our government accountable,” they said.