President Donald Trump railed on the American court system on Wednesday after a judge blocked his move to end an Obama-era program shielding hundreds of thousands of young immigrants from deportation.

"It just shows everyone how broken and unfair our Court System is when the opposing side in a case (such as DACA) always runs to the 9th Circuit and almost always wins before being reversed by higher courts," the president tweeted.

While Trump apparently referenced the 9th Circuit Court of Appeals in his statement, that court did not issue Tuesday's ruling on the Deferred Action for Childhood Arrivals program. It came from U.S. District Judge William Alsup in San Francisco, who said DACA must stay in place while lawsuits over Trump's move go forward.

Trump ended the Obama-era program in September with a six-month delay to force congressional action on legislation. Under Trump's initial move, DACA would begin to phase out on March 5 if Congress cannot agree to a deal to continue to shield the nearly 800,000 young undocumented immigrants.

States, individuals and other groups filed lawsuits over the administration's decision.

The court ruling comes as Trump and congressional leaders try to work out a deal to protect the immigrants while authorizing more funding for border security measures. The president met with bipartisan congressional leaders on Tuesday to start to hash out an agreement.

After the meeting, the White House said Trump and congressional leaders "reached an agreement to negotiate legislation that accomplishes critically needed reforms in four high-priority areas: border security, chain migration, the visa lottery, and the Deferred Action for Childhood Arrivals policy."

Earlier Wednesday, White House press secretary Sarah Huckabee Sanders called the court's decision "outrageous," especially after the meeting aiming to strike a compromise.

Trump won the White House partly on pledges to crack down on immigration. The standoff over DACA policy comes as the Trump administration this week reversed a policy allowing nearly 200,000 people from El Salvador to live in the United States.