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

A Department of Justice office said in a memo released Saturday that President Donald Trump has the authority to name the acting head of the Consumer Financial Protection Bureau, after the departing director named his own successor.

Resigning director Richard Cordray named the agency's chief of staff, Leandra English, to the post of deputy director, setting up a clash with the Trump administration.

Hours after Cordray's resignation letter Friday, Trump announced he was appointing his budget director, Mick Mulvaney, to head the consumer watchdog agency on an interim basis.

"The President may designate an Acting Director of the CFPB," the Justice Department Office of Legal Counsel wrote in an eight-page memo released Saturday.

The Justice Department cited the Vacancies Reform Act, which it said allows the president to appoint someone temporarily to an executive agency — and it argued that the CFPB is considered an executive agency.

Under the law that created the CFPB, the 2010 Dodd-Frank rewrite of the nation's financial industry regulatory regime, the deputy director serves "as acting director in the absence or unavailability of the director."

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

Sen. Elizabeth Warren, D-Mass., who helped create the CFPB, said on Twitter that if there is a vacancy the deputy director becomes the acting director, and Trump "can't override that."

Warren tweeted Saturday: "this needs to be decided in the courts."

Trump’s choice of Mulvaney to fill in as head of the consumer protection agency has rankled critics, as Mulvaney has long criticized the independent status of the bureau. Warren accused Trump of naming an acting director "determined to destroy the agency."

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. — Elizabeth Warren (@SenWarren) November 25, 2017

The Justice Department's Office of Legal Counsel acknowledges that the law establishing the CFPB designates the deputy director to take over but argues that "does not displace the President’s authority under the Vacancies Reform Act."

"Even when the Vacancies Reform Act is not the 'exclusive' means for filling a vacancy, the statute remains an available option, and the President may rely upon it in designating an acting official in a manner that differs from the order of succession otherwise provided by an office-specific statute," wrote Assistant Attorney General Steven A. Engel, the newly confirmed head of the Justice Department office.

Trump also weighed in on the controversy Saturday, tweeting that the CFPB "has been a total disaster," that "financial institutions have been devastated and unable to properly serve the public," and vowing "we will bring it back to life!"

The Consumer Financial Protection Bureau, or CFPB, has been a total disaster as run by the previous Administrations pick. Financial Institutions have been devastated and unable to properly serve the public. We will bring it back to life! — Donald J. Trump (@realDonaldTrump) November 25, 2017

The CFPB, passed in the wake of the mortgage meltdown and financial crisis, was as given a broad mandate to be a watchdog for consumers when they deal with banks and credit card, student loan and mortgage companies, as well as debt collectors and payday lenders.

Cordray was the bureau's first director. The CFPB says it secured nearly $12 billion in relief to consumers, including $3.7 billion in monetary compensation and $7.7 billion in canceled or reduced debts and other relief. The agency said that as of Jan. 1 it has handled over 1 million complaints.

Budget Director Mick Mulvaney testifies on Capitol Hill in Washington, Wednesday, May 24, 2017. Jacquelyn Martin / AP

When Wells Fargo was found to have opened millions of phony accounts for its customers, the CFPB fined the bank $100 million, the agency's largest penalty to date.

Republican Rep. Jeb Hensarling, R-Texas, chairman of the House Financial Services Committee, in a statement Saturday said the CFPB has been a "rogue agency." He said he looks forward to working with Mulvaney "to restore true accountability and due process of law to an agency that desperately needs it."

Rep. Maxine Waters of California, the top Democrat on the Financial Services Committee, issued a statement Saturday calling Mulvaney "unacceptable" to lead the CFPB because of his "noxious" views toward its mission to protect consumers.

"He was also the original co-sponsor of a bill to completely eliminate the Consumer Bureau," she wrote, "and supported other legislation to harmfully roll back Wall Street reform."