Wells Fargo & Co. agreed to pay at least $385 million to customers who say they were signed up for auto insurance without their knowledge or consent when they took out a car loan.

Terms of the proposed settlement, which needs to be approved by a judge, were filed Thursday in federal court in Santa Ana, California. National General, an auto insurance underwriter, will pay an additional $7.5 million, according to the filing.

The alleged insurance scam was one of a series of scandals involving Wells Fargo’s handling of customers’ accounts that has rocked the San Francisco-bank bank since 2016. Earlier this year, it said it might have to spend as much as $2.7 billion more than what it set aside by the end of December to resolve legal matters — boosting its estimate of “reasonably possible” legal losses by $500 million from three months earlier.

In the car insurance litigation, Wells Fargo was accused of bilking millions of dollars from “unsuspecting customers who were forced to pay for auto insurance they did not need or want,” pushing almost 250,000 of them into delinquency and resulting in almost 25,000 vehicle repossessions, according to the lawsuit filed in 2017.