Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

WASHINGTON — A federal judge declined Tuesday to force out Mick Mulvaney, President Donald Trump's choice to serve as acting director of the Consumer Financial Protection Bureau.

The ruling was a loss for Leandra English, the bureau's deputy director who believes she became the acting director when Richard Cordray, who had run the agency since 2012, stepped down last Friday.

The fight over who's in charge played out at the agency's headquarters in dueling e-mails. Mulvaney occupied the director's office again Tuesday and sent a message to employees telling them to disregard any e-mails or instructions from English.

She is "purporting to be acting director," he said.

Office of Management and Budget (OMB) Director Mick Mulvaney arrives to speak to the media at the U.S. Consumer Financial Protection Bureau on Nov. 27, 2017. Joshua Roberts / Reuters

English was on the job, too, "taking calls and meeting with external stakeholders and bureau staff," she said in a statement.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Over the weekend, English asked a federal judge to declare that she is the acting director and to forbid Trump from appointing anyone else to the position. The Justice Department urged the judge to reject her request for a temporary restraining order.

The legal fight involves two federal laws that seem to conflict. The Federal Vacancies Reform Act gives the president authority to fill vacancies in top government posts. But the statute that established the CFPB says that its deputy director "shall" become acting director when there's a vacancy in the director's chair.

Related: Mulvaney settles in at nation’s top consumer watchdog agency

Federal District Judge Timothy Kelly — who was nominated to his position by Trump in June — ruled Tuesday that, while the deputy normally does slide into the director's office when there's a vacancy, the president retains the option to choose someone else.

While the ruling deprived English of the quick victory she sought, it did not end the legal battle. The judge will schedule a hearing in the next few weeks on the details of legal dispute, and the case will probably go to a federal appeals court.

For now, Mulvaney is acting director and English remains deputy director. But there's no doubt about where the dispute is headed.

Trump will soon nominate someone to take over as the full-time director, and English will probably be asked to step down as the administration seeks to change the direction of the bureau.

Mulvaney had been an outspoken critic of the CFPB and has previously advocated for its demise.

"Anybody who thinks that a Trump administration CFPB will be the same as an Obama administration CFPB is simply being naive," Mulvaney said Monday.

About two dozen protesters gathered outside the building, calling for Mulvaney to leave and allow English to take the reins.

"We don't want a lapdog for predatory lenders. We want a watchdog for American families. That's what we're fighting for," said Sen. Jeff Merkley, a Democrat from Oregon.

Established by Congress in 2010, the bureau guards against unfair practices by lenders and debt collectors. In its most high-profile case, it fined Wells Fargo $100 milllion in 2016 for secretly opening thousands of unauthorized customer bank accounts.