Legal and regulatory expenses delivered a surprisingly steep blow to Wells Fargo & Co. in the third quarter, the latest sign that issues like its 2016 account fraud scandal could loom large over its bottom line for longer than Wall Street had expected.

The nation’s fourth-largest bank by assets on Friday reported $2 billion in expenses related to litigation, customer remediation and regulatory matters in the quarter that ended Sept. 30. The amount was nearly double what the bank had forecast for all of 2022 and more than three times what it had reported in the same quarter year earlier, prompting a flurry of questions from analysts.

“This isn’t the end of it,” Wells Fargo Chief Executive Charlie Scharf told analysts on a conference call, adding that the charge reflects the “reality of the position that we’re in to get these things behind us.”

Wells Fargo didn’t offer further details on the legal and regulatory charges, but has been hit with a series of consent orders from regulators over the past five years.

Last month, the bank agreed to pay roughly $145 million to settle allegations that its retirement plan overpaid for company stock and $94 million to resolve claims brought by borrowers who said their mortgages were put into forbearance without permission during the pandemic.

“They’re going to get hit with these left and right,” said Odeon Capital Group analyst Richard Bove, referring to legal and regulatory expenses.

In 2018, the Federal Reserve imposed a $1.95 trillion asset cap on Wells Fargo after reports surfaced that employees had created millions of fake accounts in an attempt to meet sales quotas. The asset cap limits the bank’s ability to grow its loan businesses until it meets certain risk control and governance requirements.

“Wells is a train that’s still in the repair yard, and all the other trains have pulled out of the station,” said Gerard Cassidy, an analyst at RBC Capital Markets. “They are still fighting and trying to figure out how to fix this problem. They will eventually fix it, but Wells is now being left behind.”

The bank reported a profit of $3.53 billion, or 85 cents a share, in the third quarter, compared with $5.12 billion, or $1.17 a share, a year earlier.

The legal woes cast a shadow over an earnings report that beat analyst expectations by other key metrics. The bank reported its net interest income rose by 36% to $12.1 billion, above the 31% increase that analysts surveyed by Bloomberg had estimated. Like other banks, Wells Fargo’s business has been boosted by higher interest rates that allow them to rake in larger profits on loans.

Shares of Wells Fargo rose nearly 6% in early trading Friday, but shed some of those gains throughout the day to close 2.4% higher. The stock outperformed competitors JPMorgan & Co. and Citigroup Inc., which also posted third-quarter financial results on Friday. All three banks posted lower profits than a year earlier.

The moves reflected a choppy session for the broader market, with the S&P 500 shedding early gains and ending more than 2% lower. The KBW Bank Index, which is made up of 24 national and regional banks, closed down 1.3%.