WASHINGTON — As a Republican congressman, Mick Mulvaney called the Consumer Financial Protection Bureau a “joke” and said he wished it didn’t exist. On Monday, Mulvaney showed up at the agency’s D.C. offices with doughnuts and a new title: boss.

But after a frantic weekend of political and legal posturing, Mulvaney’s arrival represented a new escalation of tensions over who ultimately will lead the agency. A day earlier, Leandra English filed suit claiming she is the “rightful acting director.”

Leadership of the agency was thrown into doubt last Friday when Richard Cordray stepped down as CFPB director and said his chief of staff, English, would temporarily replace him. A few hours later, Trump named Mulvaney, the Office of Management and Budget director and a longtime critic of the CFPB, to the job.

Both sides are pointing to the fine print in dueling federal statutes to claim authority over the job running one of the most controversial, and powerful, banking industry regulators. English filed suit late Sunday, asking for a temporary restraining order to prevent Trump from appointing Mulvaney acting director.

Mulvaney and English even sent out dueling email messages to CFPB’s likely befuddled 1,600 employees. English said in her message, “I hope that everyone had a great Thanksgiving. With Thanksgiving in mind, I wanted to take a moment to share my gratitude to all of you for your service.” English ended the note with her claimed title: “Acting Director.”

Shortly after, Mulvaney, already in the director’s office, according to photos taken by his staff, responded with his own email.

“It has come to my attention that Ms. English has reached out to many of you this morning via email in an attempt to exercise certain duties of the Acting Director. This is unfortunate but, in the atmosphere of the day, probably not unexpected,” he said.

“Please disregard any instructions you receive from Ms. English in her presumed capacity as acting director.” Mulvaney also asked CFPB employees to report any additional professional communications from English to the general counsel’s office.

“I apologize for this being the very first thing you hear from me. However, under the circumstances I suppose it is necessary. If you’re at 1700 G Street today, please stop by the fourth floor to say hello and grab a doughnut.”

Mulvaney’s spokesman later sent out a photo evidence on Twitter of empty boxes with half of a single chocolate covered doughnut remaining.

In another photo Mulvaney was shown with his jacket off and in bright multicolored socks, meeting with senior staff at the agency.

The battle for control of the agency threatens to slow down the Trump administration’s efforts to roll back financial regulations. While Trump has installed new leadership at the top of several other regulatory agencies, many of which have already taken a more business-friendly tone, the CFPB has continued to aggressively push rules that irked Wall Street. The agency has broad powers to regulate financial firms, from banks, credit card companies to payday lenders, and impose fines for wrongdoing.

That is likely to change under any Trump administration, but particularly Mulvaney. In a 2014 video interview with the Credit Union Times, Mulvaney complained that it could be difficult even to have the CFPB return a phone call. “The place is a wonderful example of how a bureaucracy will function if it has no accountability to anybody.”

The agency is a “joke . . . in a sick, sad way,” he said.

In the meantime, the legal limbo could threaten the validity of any decisions made by Mulvaney or English in the coming days, legal experts have said.

“People are being investigated by the CFPB all the time,” said Alan Kaplinsky, head of the Consumer Financial Services Group for law firm Ballard Spahr. But any firm thinking about settling with the agency now faces a significant question, he said. “Are you settling it with Mulvaney? Are you settling it with English?”

“It’s going to create absolute chaos. You are not going to be able to settle anything,” he said.