A US judge has just issued a ruling blocking the Trump administration from dismantling the Consumer Financial Protection Bureau (CFPB), a vital watchdog agency, the AP reports.

The US district judge Amy Berman Jackson’s ruling puts in place a preliminary injunction that maintains the agency’s existence while she considers the arguments of a lawsuit seeking to prevent the president’s decimation of the bureau. The judge said the court “can and must act” to save the CFPB from being shuttered, according to the AP.

The CFPB had been targeted for mass terminations, and employees were ordered to stop working last month after Donald Trump fired the bureau’s director. The current chief operating officer has said the agency was in “wind-down mode”. The president’s attacks on the bureau, which included canceling $100m in contracts and ordering immediate suspension of CFPB operations, have caused chaos, workers have testified.