The US Supreme Court has ruled against President Donald Trump’s bid to end a programme that protects hundreds of thousands of young immigrants from deportation. 

The justices upheld lower court rulings that found his move to rescind the Deferred Action for Childhood Arrivals (Daca) programme was “unlawful”.

It protects “Dreamers”, who entered the US without documents as children.

The Trump administration has sought to end the Obama-era policy since 2017.

The Supreme Court took up the case after lower courts ruled that the Trump administration did not adequately explain why it was ending the programme, criticising the White House’s “capricious” explanations.

On Thursday, the justices voted 5-4 to uphold the lower courts’ findings that the administration’s order violated the Administrative Procedure Act, which says a government action cannot be “arbitrary, capricious, an abuse of discretion or otherwise not in accordance with law” or “unsupported by substantial evidence”.

The ruling, which does not prevent the Trump administration from continuing in its efforts to end the programme, affects an estimated 700,000 young people who entered the US without documents as children. 

Mr Trump denounced the decision in a series of tweets.

“These horrible & politically charged decisions coming out of the Supreme Court are shotgun blasts into the face of people that are proud to call themselves Republicans or Conservative,” he wrote. He called on voters to re-elect him in November to put more conservative judges in the court, should there be a vacancy. He also suggested that he would renew efforts to end the programme and “start the process all over again”.

Former President Obama praised the ruling and urged voters to elect a Democratic president and Congress in November to ensure “a system that’s truly worthy of this nation of immigrants once and for all”.

Joe Biden, the 2020 Democratic presidential nominee, said he would seek to make the programme permanent should he win the election.

What is Daca?

Most of the children protected by the Daca programme are from Mexico and other Latin American countries.

A 2012 executive order, created by former President Obama, shields these so-called “Dreamers” from deportation, and provides work and study permits.

Mr Obama signed the order following failed negotiations for immigration reform on Capitol Hill.

In order to qualify for Daca, applicants under the age of 30 are required to submit personal information to the Department of Homeland Security (DHS), including addresses and phone numbers.

They must go through an FBI background check and have a clean criminal background, and either be in school, recently graduated or have been honourably discharged from the military.

In exchange, the US government agrees to “defer” any action on their immigration status for a period of two years.It is only available to individuals residing in the US since 2007.

Daca recipients told the BBC they were relieved and surprised by the ruling on Thursday, and many said they would continue advocating for immigration reform.