Wells Fargo & Co. has formally settled for $1 billion allegations the San Francisco-based bank violated consumer protection laws in administering a mandatory insurance program tied to auto loans and assessing certain improper mortgage fees. The bank agreed to pay $1 billion to the Consumer Financial Protection Bureau and $500 million to the Office of the Comptroller of the Currency. The consumer bureau said it credited the $500 million penalty to the satisfaction of the larger fine.

The OCC said its penalty “reflects a number of factors, including the bank’s failure to develop and implement an effective enterprise risk management program to detect and prevent the unsafe or unsound practices, and the scope and duration of the practices.”