NEW YORK (AP) — A federal judge ruled late Wednesday in favor of President Donald Trump and the White House over the control of the national financial watchdog agency, the Consumer Financial Protection Bureau.

In a 46-page opinion, Judge Timothy Kelly denied Leandra English, the deputy director of the CFPB, a preliminary injection that would have stopped Mick Mulvaney, Trump’s budget director, from taking on a second role as acting director of the agency.

The conflict arose late last month when Richard Cordray, named by President Barack Obama to lead the CFPB, stepped down and named English as his replacement. In response, the White House named Mulvaney as the replacement for Cordray.

ADVERTISEMENT

This is the second time Kelly ruled has against English, who sought an emergency restraining order against Mulvaney to keep him from taking over the agency. In that first ruling last month, Kelly, a Trump appointee who took the bench last year, expressed skepticism about whether English would prevail in her case.

“Because the court has determined that English is not likely to succeed on the merits, the balance of the equities would necessarily weigh against granting her an injunction,” Kelly said in his opinion.

Both English and Mulvaney have claimed to be the rightful acting director of the CFPB. But since he took over the agency, Mulvaney has been appeared far more in charge of the bureau than English. He has made some policy changes over how the bureau operates and announced last week he was bringing in his own chief of staff.

The CFPB was created in the aftermath of the 2008 financial crisis. It was the brainchild of Elizabeth Warren, who at the time was a Harvard University law professor, and now is a U.S. senator from Massachusetts. The bureau was designed to be powerful and independent, getting its funding from the Federal Reserve rather than Congress in order to shield it from political infighting.

Since its creation, the bureau has clawed back billions of dollars in unfairly paid fees and penalties for consumers and has fined major banks for wrongdoing — including Wells Fargo, which was fined $100 million for its sales practices scandal in 2015.

At the same time, the bureau’s work has made it a top target of congressional Republicans, who want to see the agency’s powers curtailed — or even eliminate it altogether. Mulvaney, when he was a member of Congress, expressed similar opinions about the bureau, which made consumer advocates fearful that he would undo much of what Cordray accomplished during his tenure.

In a statement, a lawyer for English said they were “disappointed” with Kelly’s decision.

“Mulvaney’s appointment undermines the bureau’s independence and threatens its mission to protect American consumers,” said Deepak Gupta, a lawyer with the firm Gupta Wessler.