Wells Fargo agreed to pay $1 billion to settle allegations from multiple regulators it engaged in lending abuses in its auto insurance and home loan businesses.

The settlement, announced Friday with the Consumer Financial Protection Bureau and the Office of the Comptroller of the Currency, has been widely anticipated. Last week, Wells reported a profit of $5.9 billion for the first quarter but said that number could change if it has to restate earnings once the settlement is reached.

Wells said on Friday the settlement would cut $800 million off its first-quarter profit, taking it to $4.7 billion, or 96 cents a share.

The CFPB said Friday that the violations were connected to how Wells Fargo administered a mandatory insurance program in its auto loan business and how it charged certain borrowers for mortgage interest rate lock products.

Wells agreed to pay back the customers and make changes to its risk and compliance practices.

"While we have more work to do, these orders affirm that we share the same priorities with our regulators and that we are committed to working with them as we deliver our commitments with focus, accountability, and transparency," Wells CEO Tim Sloan said in a statement.

The San Francisco bank, the nation's third-largest, has been struggling to come back from a fake accounts scandal that surfaced in 2016. Branch employees, under pressure to meet aggressive sales targets, had opened millions of fake accounts in customers' names without their knowledge.

Wells Fargo retooled its top executive ranks after that, but subsequent investigations into its own sales practices unearthed issues in its auto lending, mortgage and wealth management divisions.

The Federal Reserve took the unusual step earlier this year to restrict Wells Fargo's loan growth until it makes several internal changes to its risk management.