Monday morning got off to a weird start at the normally staid Consumer Financial Protection Bureau, when two potential leaders for the government agency showed up to work the same job. Leandra English started the day with an email to staff, sharing her excitement about working with them in her new role as acting director. But that didn’t stop Mick Mulvaney, Trump’s controversial pick for the job, from showing up with doughnuts in hand and taking a seat in the director’s office.

The battle over who will run the Consumer Finance Protection Bureau may be headed to court. But until a judge rules on who has the right to choose a temporary director, or one party decides to give up their claim, things at the Bureau will get more and more confusing.

While both sides say that law is abundantly clear about who has the power to determine the Bureau’s interim leader, no one can seem to agree on what that means. All of this is not only awkward, it also highlights the fact that, despite claims to the contrary, determining who has control of this government agency right now is pretty complicated.

On Sunday, English, the agency’s deputy director filed a lawsuit that attempts to block the president from installing his own pick as acting director instead of her. In that suit, English’s lawyer, Deepak Gupta (who formerly worked for the Bureau) asserts that, “The law is clear: Leandra English is Acting Director of the Consumer Financial Protection Bureau until the Senate confirms a new Director.”

The lawsuit filed by English cites provisions in the Dodd-Frank Act that state that in the event that the director leaves, the deputy director will “serve as acting Director in the absence or unavailability of the Director.” That language is why Richard Cordray, the Bureau’s former director, promoted English to the post of deputy director as his final act on Friday in an attempt to thwart President Trump from putting his own candidate into the position. But Trump was undeterred.

When Cordray first announced his impending resignation, Trump looked to the Federal Vacancies Act, which gives the president the authority to fill vacancies on an interim basis unless some other method of filling them is expressly authorized. But many argue that the language of Dodd-Frank does exactly that.

Trump has not been swayed by either the provision in Dodd-Frank that outlines succession, or by the Cordray’s bold move to install the acting director before leaving. Instead, the president doubled down on his choice, naming Mulvaney, who is the director of the Office of Management and Budget, as acting director of the CFPB on Friday. The president then tweeted about the Bureau, calling it a “total disaster” during Cordray’s tenure and pledging to “bring it back to life!” Supporters of the agency pushed back against that characterization, noting that the CFPB has returned $12 billion to consumers over its six-year history.

Mick Mulvaney, Trump’s controversial pick to lead the CFPB, showed up with doughnuts on Monday morning. (Aaron Bernstein / Reuters)

Things only got more complicated from there. An important detail about the lawsuit that English has filed in an attempt to gain control of the directorship is that she filed the suit on behalf of herself, not the Bureau. That’s because the CFPB’s lead counsel, Mary McLeod, is backing Trump’s claim. In a memo to senior leadership on Friday, McLeod says that the president has the authority to name Cordray’s successor. “I advise all Bureau personnel to act consistently with the understanding that Director Mulvaney is the Acting Director of the CFPB,” she writes. A letter from the assistant attorney general, Steven Engel, comes to a similar conclusion. (It’s worth noting that as recently as 2016, Engel was involved in defending payday lenders in lawsuits brought by the CFPB.)

Academic scholars aren’t as convinced about Trump’s ability to name both an acting director immediately and an official director in the future. Marty Lederman, a professor at Georgetown Law writes that the claim that the Vacancies Act supersedes Dodd-Frank, making Mulvaney the acting director is “is at the very least contestable.” And after reviewing the pertinent laws, including the Federal Vacancies Act, Nina Mendelson, a law professor at the University of Michigan, argues that while Trump can at any time appoint a new director, who will then undergo Senate confirmation, he doesn’t have the authority to install an acting director.

The fact that the succession plan for the agency has turned into a battle under the Trump administration shouldn’t be surprising. Trump spent much of his campaign haranguing the agency as ineffectual, and many Republicans opposed the creation of the Bureau in the first place, and have criticized it since the get-go.

In her lawsuit, English asked for a speedy legal resolution to this dispute. But until that happens, the work of the Bureau, which includes regulating financial institutions, educating consumers, and punishing bad financial actors, remains at risk.