A judge ruled Wednesday that Mick Mulvaney is rightfully situated as the director of the Consumer Financial Protection Bureau (CFPB), striking a blow to Leandra English's bid to assume leadership against President Donald Trump's wishes.

English, who served as previous director Richard Cordray’s deputy, is suing the Trump administration for not allowing her to assume the role of director after Cordray’s departure, but U.S. District Judge Timothy Kelly denied her request for a preliminary injunction, BuzzFeed reports. English asked Kelly to undo Trump’s appointment of Mulvaney, but he ruled that the president was within his rights as chief executive.

"Under English’s reading, the CFPB’s Director has unchecked authority to decide who will inherit the potent regulatory and enforcement powers of that office, as well as the privilege of insulation from direct presidential control, in the event he resigns," Kelly wrote. "Such authority appears to lack any precedent, even among other independent agencies."

English is expected to appeal. She has received the enthusiastic support of prominent Democrats such as Sen. Elizabeth Warren (Mass.), who have argued that the Dodd-Frank Consumer Protection Act that created the CFPB should be independent from the executive.

Mulvaney and English have each maintained a claim to the job of director, and English argued that such confusion was reason to overrule the appointment of Mulvaney. Kelly agreed that clarity about who is the actual director is important, but that led him to deny English’s request rather than remove Mulvaney, who has assumed the duties of acting director.

"The President has designated Mulvaney the CFPB’s acting Director, the CFPB has recognized him as the acting Director, and it is operating with him as the acting Director," Kelly wrote. "Granting English an injunction would not bring about more clarity; it would only serve to muddy the waters."

During this time, it has not been entirely clear what exactly English has been doing, since she has been the deputy director while claiming authority as the true director.

Trump claims the power to fill open positions in federal agencies through the Federal Vacancies Reform Act. English initially requested Kelly block Mulvaney from taking the job, which he denied, and then she attempted to obtain the preliminary injunction, which he also denied.

English’s lawyer Deepak Gupta expressed disappointment about the ruling but did not guarantee an appeal.

"The law is clear: President Trump may not circumvent the Senate confirmation process by installing his White House budget director to run the CFPB part time. Mr. Mulvaney's appointment undermines the Bureau's independence and threatens its mission to protect American consumers," Gupta said.

The Justice Department issued a statement expressing the opposite opinion.

"We are pleased the court vindicated the President’s authority to appoint Mick Mulvaney as Acting Director of CFPB, finding that Ms. English had not shown a substantial likelihood of success on the merits, and is unlikely to suffer irreparable harm," department spokeswoman Lauren Ehrsam said.