On Jan. 12, Wells Fargo said its fourth-quarter earnings rose 17 percent from a year earlier, as the consumer banking giant benefited from the recently passed GOP tax bill, but it incurred additional costs related to improper sales practices and other matters. (Matt Rourke/AP)

The Federal Reserve levied an unprecedented penalty against Wells Fargo on Friday, blocking its ability to grow larger and pressuring the mega bank to replace four board members following widespread consumer abuses.

The surprisingly harsh consent order is the latest fallout from Wells Fargo’s admission more than a year ago that it had opened millions of sham accounts customers didn’t want. The agreement, which has been in the works for months, marks the first time that the Federal Reserve has placed limits on a bank’s assets.

Wells Fargo will not be allowed to grow its $1.95 trillion in assets until the Fed approves its remediation plan. The San Francisco bank will still be able to take deposits from customers and make loans, but cannot grow bigger through a merger or another major transaction until the Fed is satisfied the bank has sufficiently reformed itself.

The bank’s problems stem from its admission in 2016 that it had fired more than 5,000 employees over five years who opened millions of phony accounts in order to earn bonuses and keep their jobs. Some customers were wrongly charged with overdraft and other fees that harmed their credit scores. The bank faced an immediate backlash on Capitol Hill, forcing longtime chief executive John Stumpf to resign and some senior executives to give up millions of dollars in bonuses. More recently, the Fed said it was troubled to hear allegations that the bank charged hundreds of thousands of borrowers for unneeded automobile insurance and other products, driving some to default on their loans and see their cars repossessed.

“We cannot tolerate pervasive and persistent misconduct at any bank and the consumers harmed by Wells Fargo expect that robust and comprehensive reforms will be put in place to make certain that the abuses do not occur again,” Chair Janet L. Yellen said in a statement issued on her last day leading the central bank.

Wells Fargo must replace three of its 16 board members by April and another before the end of the year, under its agreement with the Federal Reserve. The board, critics say, failed to detect the problems and then was slow to respond.

For years, Wells Fargo dazzled Wall Street with strong growth and large profits. But in recent years, Wells Fargo prioritized “overall growth without ensuring appropriate management of all key risks,” the Federal Reserve said in a statement. “This prevented the proper escalation of serious compliance breakdowns to the board of directors.”

Wells Fargo said that as part of its agreement with the Federal Reserve it would submit a plan detailing how it would enhance its corporate governance within 60 days. “We take this order seriously and are focused on addressing all of the Federal Reserve’s concerns,” Timothy J. Sloan, Wells Fargo’s president and chief executive, said in a statement.

The consent order addressed conduct that the bank has already taken several steps to correct, Sloan said in a conference call with analysts, and would not affect its financial condition. Despite the severity of the consent order, he said, “we are open for business.”

Wells Fargo has struggled to put the scandals to rest as new revelations only magnified the extent of the abuses. For instance, Wells Fargo said last year that employees had created far more sham accounts — 3.5 million rather than 2 million — over a much larger period than it initially reported.

In December, President Trump lashed out at the bank on Twitter. “Fines and penalties against Wells Fargo Bank for their bad acts against their customers and others will not be dropped, as has been incorrectly reported, but will be pursued and, if anything, substantially increased,” Trump said in a tweet. “I will cut Regs but make penalties severe when caught cheating.”

Wells Fargo’s rolling scandals have become a nuisance to the rest of the banking industry, which has hoped to benefit from the Trump administration’s focus on rolling back financial regulations that the White House complains has hampered economic growth. Democrats and consumer groups often point to the bank’s troubles as proof the industry needs more regulation, not less.

Yellen had previously called Wells Fargo’s conduct “unacceptable,” but the penalty announced Friday came as a surprise and appeared to even satisfy one of the bank’s harshest critics, Sen. Elizabeth Warren (D-Mass.).

“Chair Yellen’s decision today to freeze the growth of Wells Fargo until it shapes up also demonstrates that we have the tools to rein in Wall Street — if our regulators have the guts to use them. This one hits them where it hurts,” Warren said Friday on Twitter. “Fines alone will never rein in fraudulent behavior at the big banks. We need tough penalties that affect the actual lives of the people who run the banks. By pushing out Board Members at Wells Fargo, Chair Yellen sent a strong message.”

The Fed governors voted 3-to-0 to approve the consent order. Randal Quarles, the Fed’s head of bank supervision, abstained from the vote because of his extended family’s ties to the bank.

“While there is still more work to do, we have made significant improvements over the past year to our governance and risk management that address concerns highlighted in this consent order,” said Sloan, the bank’s chief executive.

Erik Gordon, a law professor at the University of Michigan in Ann Arbor, said the order would probably fend off criticism that regulators have not been tough enough on big banks.

“If management’s claims that they didn’t know about all of the wrongdoing is true, then how can you let it get bigger?” Gordon said. “They did more than give them a slap on the wrist or one of these fines that is just the cost of doing business.”

Still, he added, “if such widespread blatant wrongdoing had been found at a smaller bank, they would have simply been closed.”