When Leandra English joined the Consumer Financial Protection Bureau more than six years ago, it was an uncertain federal start-up with an ambitious mission to look out for people with mortgages, credit cards and other loans.

“It shocked me that something like the bureau didn’t already exist,” English told The Washington Post in 2014 as she described what it was like to be one of the watchdog agency’s first employees. “The need for it was so obvious. I knew I wanted to help build it — it didn’t matter that I had little idea what I’d be doing.”

Former CFPB Director Richard Cordray’s decision to tap English as his temporary replacement late Friday sparked a showdown with the White House over who will run the agency. Legal experts say the decision will probably end up in court. A few hours after Cordray announced English would serve as the agency’s acting director, President Trump named Mick Mulvaney, a longtime critic of the agency and the Office of Management and Budget director, to the acting position.

The White House says that it expects both Mulvaney and English to show up to work Monday morning. Mulvaney would be the acting director, while English would be his deputy, administration officials insist.

But English has not spoken publicly about her plans yet. She could sue to block Mulvaney from the job — or even bar him from entering the building, legal experts say.

“She could seek a declaratory judgment. She could seek a restraining order to prevent the government from doing that,” said Laurence H. Tribe, a constitutional law professor at Harvard Law School. “I can’t predict who will blink first.”

There is a lot at stake for the CFPB, which now has 1,600 employees and has long been a target of Republican critics who say the agency needs to be reined in. Mulvaney has called the agency a “joke” and advocated for it to be dissolved. In a tweet Saturday, Trump called the CFPB “a total disaster” and said “We will bring it back to life.”

The tussle over leadership of the agency has also fallen along partisan lines. On CNN’s “State of the Union” Sunday, Sen. Dick Durbin (D-Ill.) said he believed English was rightly in control of the agency. “Remember, this was the agency that fined Wells Fargo $100 million for defrauding the people who were creating phony accounts,” Durbin said. “It’s a watchdog agency. Wall Street hates it like the devil hates holy water.”

Meanwhile, Sen. Lindsey Graham (R-S.C.) backed the appointment of Mulvaney. The CFPB is out of control, he said. “They can get into everybody’s business. I don’t think they added much at all to the consumer protection. They sure add a lot to increasing costs for midsize banks throughout the country that had nothing to do with the financial collapse.”

Democrats and consumer groups, who have trumpeted the agency’s track record for going after big banks, say they are resigned to a Trump administration takeover of the agency eventually but want English to serve as acting director until Trump nominates a permanent replacement who can be confirmed by the Senate. Even that temporary delay would offer the agency some stability before it undergoes what many fear could be a potentially radical restructuring, they say.

“The only thing that will turn the @CFPB into a disaster is for @realDonaldTrump to ignore Dodd-Frank & name an acting director determined to destroy the agency,” tweeted Sen. Elizabeth Warren (D-Mass.), who, as a Harvard Law School bankruptcy professor, came up with the idea for the agency.

Whoever takes the reins of the agency Monday morning, their decisions could quickly become subject to a legal challenge, legal experts say. Even mundane actions by the CFPB could be thrown out should their case prevail, they said.

For years, English has served in various positions within the CFPB, the Office of Personnel Management and the Office of Management and Budget. According to several people who know her, English, who attended New York University and the London School of Economics, has typically gravitated toward operational positions rather than policy jobs and has been able to rise through the ranks because of her steady leadership skills.

She was a part of a small team at the Treasury Department that helped launch the CFPB, including establishing early relationships with small banks. “It felt like we were engaging in retail politics a little bit,” English said in the 2014 Washington Post interview. “Time after time, we would go into a room, especially with community bankers, and you could just feel instantly that they were very skeptical, nervous, not expecting us to be friendly. And by the time we walked out, the tone had completely changed.”

She eventually rose to be the agency’s chief of staff. Cordray then promoted her to deputy director last Friday and said she would temporarily take his place. “Leandra is a seasoned professional who has spent her career of public service focused on promoting smooth and efficient operations. As deputy director, we will continue to benefit from Leandra’s in-depth knowledge of the operational needs of this agency and its staff,” Cordray said in a statement announcing he was promoting her to deputy director.

The White House has argued that while Cordray’s appointment of English may be legal, the president’s authority under the Federal Vacancies Reform Act allows him to install Mulvaney instead. The Justice Department’s Office of Legal Counsel issued an eight-page opinion late Saturday supporting Mulvaney’s appointment as temporary head of the agency. Administration officials said Trump is likely to nominate a permanent replacement in the next few weeks.

“I thought it was unconvincing,” Tribe said of the Justice Department opinion.

Some legal analysts are calling the White House move to name Mulvaney acting director illegal. The White House could go to court preemptively to settle this matter rather than creating more uncertainty by putting Mulvaney in the job, legal experts say. The 2010 legislation that created the bureau, known as Dodd-Frank, specifically gave the Cordray the power to name an acting director to temporarily replace him, they say.

Even the White House has acknowledged English could determine the course of the tug-of-war over the agency’s leadership. Trump has the legal authority to appoint Mulvaney to the job, a senior administration official told reporters Saturday, but “we’ll find out [whether there will be a legal battle] based on how Ms. English decides to act at the appropriate time.”

Alan Kaplinsky, head of the Consumer Financial Services Group for law firm Ballard Spahr, said English’s best choice may be to go to court: “I don’t think there is really any other good option for her.”

“I assume she is going to show up for work tomorrow. I assume Mulvaney will too. What are they going to do?,” asked Kaplinsky, who has represented several companies before the CFPB. “The court option is the only practical way to deal with this issue.”

“If she doesn’t bring a lawsuit, then I would hope Trump and Mulvaney would bring a lawsuit against her, this has got to get resolved in the courts,” said Kaplinsky.

If a court later determines the person the firm chose was not actually the acting the director, the deal could be thrown out, he said. “It’s going to create absolute chaos. You are not going to be able to settle anything.”

“On the regulatory side, any further rule making will just stop for the time being. Nobody can do anything until everybody knows who is the legitimate director,” he said. “It’s an untenable situation and one that begs for a court determination and a quick one.”