Wells Fargo plans to cut as many as 26,500 jobs over three years as the troubled bank adapts to the rise of online banking.

“We are continuing to transform Wells Fargo to deliver what customers want — including innovative, customer-friendly products and services — and evolving our business model to meet those needs in a more streamlined and efficient manner,” Chief Executive Officer Tim Sloan said in a statement on Thursday.

Cuts will come through layoffs and attrition, he added.

The job cuts at the nation’s third largest bank reflect its “ongoing transformation, which addresses industry trends and changes in customer behavior,” Sloan said.

CNBC noted that the company, which has $1.9 trillion in assets, cited changing preference such as the “adoption of digital self-service capabilities,” as a key catalyst.

The cuts  will hit between 5-10 percent of Wells Fargo’s work force. The bank currently employs roughly 265,000 workers.

“Wells Fargo takes very seriously any change that involves its team members, and as always, we will be thoughtful and transparent, and treat team members with respect,” Sloan said in a statement.

Wells Fargo also has been plagued by one scandal after another over the past two years. The legal problems have forced the bank to look for ways to cut costs.

The bank denied recent rumors this week that former Goldman Sachs executive Gary Cohn was potentially replacing Sloan, CNBC reported.

Betsy Duke, chair of the lender’s board of directors, said in statement that the CEO “has the unanimous support of the board, and this support has never wavered.”

The San Francisco-based bank has been under multiple clouds of scandal starting in 2015 when it admitted its employees opened millions of fake bank accounts for customers in order to meet unrealistic sales goals. Wells has since tried to make amends with the public and its customers, but every time it seems like Wells has put one scandal behind it, another pops up in its place. Since that admission Wells has admitted to other scandals, including selling auto insurance to borrowers who did not need it and selling high-cost wealth management products to customers who also did not need them.

State and federal regulators, who have clearly lost patience with Wells’ pledge of making amends, have put restrictions on Wells’ business and have fined the bank more than $1.2 billion in penalties for its bad behavior. The Federal Reserve went further earlier this year, forcing Wells to not grow any larger from its current size until it says otherwise. The Fed also mandated Wells replace some of its board of directors.

All this has weighed on the bank’s business. Wells’ annual profits have been down or flat since 2015, despite the banking industry nationwide benefiting from higher interest rates and lower taxes.