Wells Fargo & Co. agreed Friday to pay a massive $3 billion penalty and to accept a three-year deferred prosecution agreement to avoid a criminal trial over its fake bank account scandal.

CEO Charles Scharf issued a statement saying, "The conduct at the core of today's settlements—and the past culture that gave rise to it—are reprehensible and wholly inconsistent with the values on which Wells Fargo was built."

Scharf said over the past three years "we've made fundamental changes to our business model, compensation programs, leadership and governance [but] there's still more work we must do to rebuild the trust we lost."

The deal was announced at a press conference by U.S. Attorney Nicola Hanna in Los Angeles.

Hanna said for 15 years the bank "pursued an aggressive business strategy, selling additional banking products to customers, including checking and saving accounts. This volume-based growth plan emphasized loading up each customer with as many products as possible [and] permeated all aspects of community banking business."

This cross-sell strategy, he said, led to "widespread abuses, unethical conduct and illegal activity," including the opening of bank accounts without customers' knowledge or consent.

The settlement resolved three separate investigations, including a criminal one by the Department of Justice into fake accounts; a civil one by the Justice Department into false bank records; and a civil one by the U.S. Securities and Exchange Commission into misleading investors.

The commission's $500 million civil penalty, which is included in the $3 billion, will go to harmed investors, said Stephanie Avakian, co-head of the enforcement division at the SEC.

Hanna said some investigations are ongoing and Wells Fargo is cooperating, but would not disclose details.

In reaching the settlement, he said prosecutors considered past and ongoing cooperation; remedial actions already taken, including sufficient changes to upper management and a reconstituted board of directors; enhancement of its compliance program; compensation to customers who were victimized; and the bank's complete admission of wrongdoing and acceptance of responsibility.

Since the scandal broke, the company has replaced its board chairman, its CEO twice, its general counsel and numerous other executives.

Last November Wells Fargo announced that new general counsel Allen Parker, who had been serving as interim CEO and was leading reforms, was leaving. Parker agreed to stay on as general counsel until March 31, presumably to oversee Friday's settlement.

The company has yet to name a new general counsel.

In addition, in February 2018 the Federal Reserve imposed an unprecedented asset freeze, in the form of a cease and desist consent order, that limits the San Francisco-based bank's growth to its December 2017 level. In effect, the order halted most lending and most growth until the bank raised its corporate governance standards to acceptable levels.

Wells Fargo said the $3 billion penalty was fully accrued as of last Dec. 31.

At least one consumer rights group, Public Citizen, quickly criticized the settlement. "Any resolution for Wells Fargo's massive, management-directed misconduct must hold individuals to account," the group said in a statement. "Wells Fargo's fake account scandal is as clear and understandable as pickpocketing."

It went on to say criminal violations should be deterred through criminal enforcement actions, not deferred prosecution agreements. "Protecting Wells Fargo from the consequences of its wrongdoing is not the DOJ's job," it concluded.

Read More: