President Donald Trump has slammed the US court system as "broken and unfair" after a federal judge's blocked him from ending an Obama-era programme protecting young illegal immigrants from deportation.

US District Judge William Alsup on Tuesday granted a request by California and others to prevent Mr Trump from ending the Deferred Action for Childhood Arrivals (DACA) programme – at least while their lawsuits play out in court.

Mr Trump responded via Twitter, writing: "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 White House also issued a statement calling the decision "outrageous".

"An issue of this magnitude must go through the normal legislative process,“ Press Secretary Sarah Sanders said. ”President Trump is committed to the rule of law, and will work with members of both parties to reach a permanent solution that corrects the unconstitutional actions taken by the last administration.“

People strike across America for A Day Without Immigrants Show all 16 1 /16 People strike across America for A Day Without Immigrants People strike across America for A Day Without Immigrants Demonstrators march during the "Day Without Immigrants" protest in Chicago, Illinois, February 16, 2017. Theopolis Waters/Reuters People strike across America for A Day Without Immigrants Demonstrators march during the "Day Without Immigrants" protest in Washington, DC, U.S., February 16, 2017. Aaron P. Bernstein/Reuters People strike across America for A Day Without Immigrants Protesters march in the streets outside the Texas State Capital on 'A Day Without Immigrants' February 16, 2017 in Austin, Texas. The crowd, which grew to well over a thousand participants, marched from the Austin City Hall to the Texas State Capital. Across the country hundreds of restaurants and eateries are closing for the day to protest President Trump's immigration policies and to highlight the contributions of immigrants to U.S. business and life. Drew Anthony Smith/Getty People strike across America for A Day Without Immigrants Protesters march in the streets outside the Texas State Capital on 'A Day Without Immigrants' February 16, 2017 in Austin, Texas. Drew Anthony Smith/Getty People strike across America for A Day Without Immigrants AUSTIN, TX - FEBRUARY 16: Protesters march in the streets outside the Texas State Capital on 'A Day Without Immigrants' February 16, 2017 in Austin, Texas. Drew Anthony Smith/Getty People strike across America for A Day Without Immigrants Demonstrators march during the "Day Without Immigrants" protest in Chicago, Illinois, February 16, 2017. Theopolis Waters/Reuters People strike across America for A Day Without Immigrants Demonstrators march during the "Day Without Immigrants" protest in Chicago, Illinois, February 16, 2017. Aaron P. Bernstein/Reuters People strike across America for A Day Without Immigrants Protesters march in the streets outside the Texas State Capital on 'A Day Without Immigrants' February 16, 2017 in Austin, Texas. The crowd, which grew to well over a thousand participants, marched from the Austin City Hall to the Texas State Capital. Across the country hundreds of restaurants and eateries are closing for the day to protest President Trump's immigration policies and to highlight the contributions of immigrants to U.S. business and life. Drew Anthony Smith/Getty People strike across America for A Day Without Immigrants Protesters march in the streets outside the Texas State Capital on 'A Day Without Immigrants' February 16, 2017 in Austin, Texas. Drew Anthony Smith/Getty People strike across America for A Day Without Immigrants Protesters march in the streets outside the Texas State Capital on 'A Day Without Immigrants' February 16, 2017 in Austin, Texas. Drew Anthony Smith/Getty People strike across America for A Day Without Immigrants Protesters march in the streets outside the Texas State Capital on 'A Day Without Immigrants' February 16, 2017 in Austin, Texas. Drew Anthony Smith/Getty People strike across America for A Day Without Immigrants Protesters march in the streets outside the Texas State Capital on 'A Day Without Immigrants' February 16, 2017 in Austin, Texas. Drew Anthony Smith/Getty People strike across America for A Day Without Immigrants Protesters march in the streets outside the Texas State Capital on 'A Day Without Immigrants' February 16, 2017 in Austin, Texas. Drew Anthony Smith/Getty People strike across America for A Day Without Immigrants Protesters march in the streets outside the Texas State Capital on 'A Day Without Immigrants' February 16, 2017 in Austin, Texas. The crowd, which grew to well over a thousand participants marched from the Austin City Hall to the Texas State Capital. Across the country hundreds of restaurants and eateries are closing for the day to protest President Trump's immigration policies and to highlight the contributions of immigrants to U.S. business and life. Drew Anthony Smith/Getty People strike across America for A Day Without Immigrants High school student Kathia Suarez holds up a sign as she protests with others outside the Grayson County courthouse in downtown Sherman, Texas, Thursday, Feb. 16, 2017. LM Otero/AP People strike across America for A Day Without Immigrants High school senior Vicky Sosa holds a sign outside the Grayson County courthouse in downtown Sherman, Texas, Thursday, Feb. 16, 2017. In an action called "A Day Without Immigrants," immigrants across the country are expected to stay home from school, work and close businesses to show how critical they are to the U.S. economy and way of life. LM Otero/AP

DACA has protected about 800,000 people who were brought to the US illegally as children, or came with families who overstayed visas, from the threat of deportation. The programme also gives those in the programme the right to education and work visas. The programme includes hundreds of thousands of university-age students.

Judge Alsup said lawyers in favour of DACA clearly demonstrated that the young immigrants “were likely to suffer serious, irreparable harm” without court action. The judge also said the lawyers have a strong chance of succeeding at trial.

US Attorney General Jeff Sessions announced in September that the programme would be phased out, saying former President Barack Obama had exceeded his authority when he implemented it in 2012. Mr Trump gave Congress six months to pass permanent protections for the so-called "Dreamers" before they expired.

US rescinds DACA program for young immigrants

Mr Alsup, however, called The Trump administration's argument a "flawed legal premise," citing years of past actions by immigration authorities to provide similar relief from deportation.

"DACA was and remains a lawful exercise of authority' by immigration officials," Mr Alsup wrote.

The President held a meeting with a bipartisan group of legislators earlier this week to work on a solution for DACA. In the meeting, he told legislators he wanted a "bill of love" to protect young, undocumented immigrants, but also pushed for his proposed border wall and tougher border security.

"Let's see if we can get something done," Mr Trump said. "I really think that we have a chance to do it. I think it's really important."

The DACA decision is one of several Trump-administration immigration policies that have been struck down by federal judges. Mr Trump's ban on travellers from several Muslim-majority countries was blocked by numerous federal judges before the Supreme Court allowed a revised version to go into effect.