Wells Fargo & Co. agreed to a $3.7 billion settlement with the Consumer Financial Protection Bureau to settle a variety of allegations of mistreating customers, including a $1.7 billion fine that's the biggest in CFPB history.

The agreement includes more than $2 billion in "redress to consumers," the CFPB said in a statement Tuesday that cited "widespread mismanagement" of auto loans, mortgages and deposit accounts.

"Wells Fargo's rinse-repeat cycle of violating the law has harmed millions of American families," CFPB Director Rohit Chopra said in the statement. "The CFPB is ordering Wells Fargo to refund billions of dollars to consumers across the country. This is an important initial step for accountability and long-term reform of this repeat offender."