(CNN) President Donald Trump named an interim head of the Consumer Financial Protection Bureau shortly after the outgoing director appointed his own successor, signaling a potential showdown over who's in charge of the federal watchdog agency.

Trump named Mick Mulvaney, the current director of the Office of Management and Budget, as interim director of the consumer agency.

"Director Mulvaney will serve as acting director until a permanent director is nominated and confirmed," the White House said in a statement Friday.

But hours before, the consumer agency's outgoing director, Richard Cordray, had sent a letter to Trump, declaring he was officially done leading the agency once the clock struck midnight.

Cordray named his chief of staff, Leandra English, as deputy director, which essentially establishes her as the bureau's acting director.

The departure of Cordray, the first-ever director of the consumer agency and an appointee of President Barack Obama, marks an opening for Trump to overhaul the agency's leadership.

Who will be the director?

The two appointments sparked confusion on who will be in charge when employees return to work Monday.

The White House on Saturday defended the President's authority to appoint Mulvaney, calling it a "typical, routine move."

"We think that this move is clearly supported by a plain reading of the Vacancies' Act," a senior administration official said on a call with reporters, referring to the presidential appointment authorities outlined in the Federal Vacancies Reform Act of 1998.

"The Vacancy Act is a long-established, used by presidents of both parties as a routine function, and we believe this act is consistent with that long-established practice."

But in a tweet Friday night, Sen. Elizabeth Warren, an architect of the consumer agency, said that under the Dodd-Frank financial reform law, the agency's deputy director assumes the role of acting director if there's a vacancy.

The Dodd-Frank Act is clear: if there is a @CFPB Director vacancy, the Deputy Director becomes Acting Director. @realDonaldTrump can't override that. pic.twitter.com/r949ccaJAb — Elizabeth Warren (@SenWarren) November 25, 2017

Trump "can't override that," she tweeted.

The President "can nominate the next director -- but until that nominee is confirmed by the Senate, Leandra English is the Acting Director under the Dodd-Frank Act," Warren tweeted.

In more fine print, the administration can appoint a current government official into a new job as long as they are confirmed by the Senate under the Federal Vacancies Act to serve in an acting capacity. The official is not required to leave their current position to fill the new role until a permanent replacement is confirmed by the Senate.

Mulvaney said he will continue to serve as director of the Office of Management and Budget in addition to the new role.

Major critic

Like many Republicans, Mulvaney has been a major critic of the consumer watchdog agency.

While serving in Congress, he voted in favor of killing the agency, which was created after the financial crisis to protect consumers and keep an eye on Wall Street.

Mulvaney and other opponents have argued that the consumer agency has too much power, saying it installs unduly harsh regulations. He has worked alongside Trump to roll back some of the consumer agency's rules.

Mick Mulvaney

Trump signed legislation this month repealing a rule issued by the CFPB that made it easier for consumers to team up to sue banks and credit card companies.

Some Republicans had called for Cordray's firing, saying his regulatory authority has lacked oversight during his tenure at the consumer agency.

Vital to economy

In his exit letter, Cordray said the consumer agency's work is vital to the US economy.

Proponents of the Consumer Financial Protection Bureau say it plays a key role in preventing big business from preying on the little guy.

"We have returned almost $12 billion to more than 30 million consumers who had been cheated or mistreated by banks or other large financial companies," Cordray wrote in the letter.

Obama angered Republicans when he installed Cordray in 2012 while the Senate was in recess, but the Senate confirmed him for a full five-year term in 2013.

Republicans have tried to replace the director with a committee and seek ways to make it easier to challenge the bureau's rules. Other independent agencies are usually led by commissioners or board members.

Democrats are lining up to scrutinize any future Trump nominee.