Decision gives the Trump administration three months to deliver better legal reasoning on why programme is illegal.

A US federal judge ruled that the administration of President Donald Trump must continue the Deferred Action for Childhood Arrivals (DACA) programme that protects young undocumented immigrants from deportation.

Judge John Bates of the District Court for the District of Columbia wrote in a ruling issued on Tuesday evening that the Department of Homeland Security’s (DHS) “decision to rescind DACA was predicated primarily on its legal judgment that the programme was unlawful. That legal judgment was virtually unexplained”.

Bates is the third federal judge to rule against ending DACA.

Former US President Barack Obama created DACA in 2012. It offered two-year renewable work permits to undocumented immigrants brought to the US as children. Roughly 700,000 people have enrolled in the programme since it was created.

If DHS cannot produce a better argument for why DACA was illegal in 90 days it would have to process new applications for the programme, Bates wrote.

The district court was deciding on two cases, NAACP v Trump and Princeton v United States, which were filed in September and November 2017, respectively.

The cases were filed shortly after Trump ended the programme on September 5, 2017.

Crackdown

Trump ran on a campaign platform of cracking down on immigration during the 2016 presidential election. A popular slogan at his campaign rallies was “Build the wall“, which referenced to a barrier on the US-Mexico border to discourage immigrants from crossing the border without documents.

Since assuming office in January 2017, the Trump administration has adopted a hardline approach to immigration, increasing deportations of undocumented immigrants inside the US.

Under Obama, DHS’s Immigration and Customs Enforcement (ICE), which arrests suspected undocumented immigrants in the US, was told to focus on those with a criminal record.

Reports say that under Trump, ICE has expanded immigration raids to include those without criminal records.

Democrats, who anticipate victories in upcoming midterm elections for the US Congress, have positioned themselves as defenders of immigrants and minority groups such as Muslims.

In late 2017 and early 2018, Democrats threatened to block a spending increase that would have shuttered the US government until Trump or Republicans codified protections for DACA recipients.

Trump signalled he would allow protections for DACA-protected individuals if Democrats allocated funding for the border wall.

Democrats caved in March, passing a $1.3tn omnibus to keep the US government working without protections for immigrants.

The move made DACA recipients feel “sold out” by Democrats.

Trump and DHS have yet to respond to the judge’s order. Earlier in April, Trump tweeted that Border Patrol agents “are not allowed to properly do their job” and there would be “NO MORE DACA DEAL!”