On Nov. 9, Senator Elizabeth Warren paid a visit to the headquarters of the Consumer Financial Protection Bureau in Washington, the agency she helped create before she got to Congress.

The Massachusetts Democrat’s meeting with CFPB staffers had been scheduled before the election. Taking in the surprise result, Warren offered a sobering description of the uncertainties that lay ahead for the young agency with Republicans in control of both the White House and Congress, according to people familiar with her remarks. She told the staffers she would fight against any attempts to change the agency’s structure or funding, or any of the rules the regulator was working on.

Warren is digging in because of what the CFPB’s work means to her. The agency is part of the Dodd-Frank Act, which was passed to rein in the financial-services industry after the crisis of 2008. Its charge is to combat “unfair, deceptive, or abusive acts and practices” at banks and credit unions with more than $10 billion in assets. The CFPB is also a watchdog for mortgage servicers, payday lenders, and debt collectors.

And it’s been very active. The agency levied a $100 million fine against Wells Fargo after disclosures that employees had opened unauthorized accounts for customers in an effort to meet sales goals. It has compelled lenders to verify that borrowers can afford to repay loans and has mandated improved disclosure in mortgage, credit card, and student loan forms and on monthly statements. In all, the CFPB has provided almost $12 billion in relief to about 27 million consumers since it opened its doors in 2011. It has won praise from consumer-rights activists.

“A lot of the people who voted for Trump are people who got the short end of the economic stick,” says Ira Rheingold, executive director of the National Association of Consumer Advocates. “And the fact is, the CFPB is an important protector of those people.”

It’s been a “hot place to work,” says Adam Levitin, a professor at the Georgetown University Law Center.

It sure has. From the start, the agency has been a lightning rod for Republicans and many in the financial-services industry who say certain rules restrict consumers’ access to credit and financial products they want. They complain that the director, Richard Cordray, has too much power. Some of the language in the statute that created the bureau “is so broad and vague that it has let them go after anything they don’t like, even if there’s no evidence of any consumer harm or injury,” says Alan Kaplinsky of the law firm Ballard Spahr, who fought the CFPB’s work to change arbitration clauses that prevent consumers from suing. Democrats respond that the CFPB must report extensively to Congress.

The agency isn't the only Obama-era consumer protection measure that could be in jeopardy. Another is the Department of Labor’s fiduciary rule, yet to take effect, which calls for brokers and financial advisers to put clients’ interests ahead of their own when handling retirement investments. The rule is expected to accelerate the shift of client money into low-cost index funds and away from actively managed funds, especially those with sustained subpar performance and high fees. Only about 15 percent of actively managed large-cap domestic stock funds beat the S&P 500 Index in the 10 years ended June 30, according to Dow Jones Indices.

Although President-Elect Donald Trump has said nothing about the rule, his fundraiser and adviser Anthony Scaramucci, founder of SkyBridge Capital, has argued that it would drive small investment advisers out of business, force people into index funds when active funds might better meet their needs, and ultimately cost investors money.

“Let the free market dictate where assets flow,” Scaramucci wrote in a Nov. 1 op-ed piece in the Wall Street Journal.

The prospect of a weaker CFPB and less regulation all around has excited investors. Short-term-lending companies Enova International and Worldwide Acceptance Corp. have hit 52-week highs since Election Day, up more than 30 percent and 29 percent. Signs of defanging ahead are driving up shares of Regions Financial Corp. and International Bancshares Corp., banks that Jeffries analyst John Hecht says are exposed to another area of CFPB interest, overdraft fees. They have risen 17 and 25 percent since Nov. 8.

The threat has Warren excited, too:

The president-elect has said he plans to dismantle the Dodd-Frank Act. He hasn’t discussed specific plans for the CFPB. With current filibuster rules, Congress likely can’t change the agency without the votes of some Senate Democrats.

But Republicans may have a degree of leverage. While Cordray’s term doesn’t run out until 2018, Trump might be able to replace him sooner. A federal appeals court in October voided a provision that the director could be removed by the president only for cause. The agency has said it is “considering options” for seeking a review of the ruling.

That Trump could have his pick of directors “is enough to prod the desire for a bipartisan solution,” says Raj Date, who was the CFPB’s first deputy director. The U.S. Public Interest Research Group’s consumer program advocate, Mike Litt, expects the action to heat up during the federal budget process in Congress in December.

“We’re anticipating that there will be attempts to use the budget to sneak in attacks against the CFPB with a bunch of policy riders,” he says.

One possible change is rolling back the power of the director, who can approve rules and enforcement actions alone. House Financial Services Committee Chairman Jeb Hensarling (R-Texas) has proposed, as part of legislation that would jettison other parts of Dodd-Frank, to have the bureau run by a bipartisan five-member committee.

There have been proposals to change the source of the agency’s funding, which comes from the Federal Reserve rather than through Congress. The CFPB’s future depends on being able to pay salaries that attract talent, says Georgetown Law’s Levitin.

“If you’re a recent grad at a top law school, if you have any interest in federal regulation, the CFPB is the place to go,” he says. “That could change on a dime.”

Hensarling has proposed requiring the CFPB to do more cost-benefit analysis before adopting rules and wants to take the term “abusive” out of its charter.

“Without being able to go after abusive acts or practices, the agency would have had much weaker ability to pursue the Wells Fargo case,” Levitin says.

Many existing CFPB rules will probably stay intact, says Isaac Boltansky, a policy analyst at Compass Point Research & Trading. But he expects the leadership of the agency to eventually move to a committee and thinks this will double the time it takes to make rules and cut the number of enforcement actions in half.

And the agency is likely to “think much harder about congressional reaction to its rules,” says Quyen Truong, the former deputy general counsel at the CFPB, who’s now a partner at the law firm Stroock & Stroock & Lavan.

Also on Hensarling’s wish list is a new name: the Consumer Financial Opportunity Commission.

This article was provided by Bloomberg News.