Wells Fargo & Co. will pay $575 million to settle state-level claims over sales practices, marking the latest cost in the fallout from a series of scandals that erupted at the bank more than two years ago.

The settlement with 50 states and the District of Columbia announced Friday resolves state investigations into Wells Fargo’s practices from 2002 to 2017. The practices, which have previously been disclosed, include opening bogus accounts, charging improper mortgage rate-lock extension fees and forcing insurance policies on auto-lending customers.

Wells Fargo’s expenses surged over the past two years, driven by fines and legal costs as investigations multiplied across business lines. Following the 2016 revelation that bank employees opened as many as 3.5 million accounts without customer approval in order to meet sales goals, issues have emerged in the bank’s consumer-lending, wholesale and wealth-management arms.

“Wells Fargo customers entrusted their bank with their livelihood, their dreams and their savings for the future,” California Attorney General Xavier Becerra said in a statement. “Instead of safeguarding its customers, Wells Fargo exploited them, signing them up for products - from bank accounts to insurance - that they never wanted.”

The bank said in a statement that it had already set aside $400 million for the settlement and would take a $175 million provision in its fourth-quarter results. California, the bank’s home state, will get the biggest payment in the settlement at about $150 million, according to a spokeswoman for Becerra.

“This agreement underscores our serious commitment to making things right in regard to past issues as we work to build a better bank,” Chief Executive Officer Tim Sloan said in the statement.

It’s been a costly year for the bank. Among its penalties in 2018 were $1 billion to federal regulators for consumer mistreatment and $480 million for an investor class-action lawsuit. The bank also settled with the U.S. over crisis-era mortgages for $2.09 billion in August.

Earlier this year, the Federal Reserve imposed an unprecedented growth ban on Wells Fargo, in place until the bank can demonstrate that it has fixed its missteps. Democratic Senator Elizabeth Warren repeatedly called for Sloan’s ouster, and at one point, Wells Fargo Chair Betsy Duke denied rumors that the bank’s board had reached out to Gary Cohn to replace the CEO.

Next year isn’t panning out to be any easier. A soon-to-be Democratic House of Representatives will gain subpoena power, and the Financial Services Committee’s presumptive chair, Maxine Waters, has already labeled the bank a top priority. Ongoing probes and the bank’s recent removal of two top executives from the operating committee and firing of about three dozen district managers in the retail bank hint of more fallout on the horizon.

This article was provided by Bloomberg News.