The fake-accounts scandal that tarnished Wells Fargo's reputation and forced out its chief executive officer two years ago has weighed on its stock ever since.

The San Francisco lender's 4 percent gain since the 3.5 million unauthorized accounts became front-page news lags far behind the double-digit growth of rivals from Citigroup to Bank of America, which rose 76 percent in the same period, as well as the broader S&P 500.

The harm investors suffered as a result is behind Wells Fargo's latest settlement in the matter, a $65 million agreement with the New York Attorney General's Office announced on Monday.

"In Congressional testimony, Wells Fargo's former CEO stated that he personally became aware of widespread fraud by Wells Fargo employees in 2013," the prosecutor's office said in a statement. The bank's leaders, however, didn't tell shareholders for another three years about the misconduct at the heart of revenue growth from its business model of selling as many as eight different products to each customer household.

In order to meet the target, workers -- some making as little as $12 an hour -- were opening additional accounts for customers without their knowledge, regulators said. In some cases, fees associated with the unwanted products led to checking-account overdrafts and additional charges.

When the truth was disclosed, in a September 2016 settlement with the Consumer Financial Protection Bureau and local regulators, New York investors lost millions of dollars," the agency said. The settlement doesn't end the Attorney General's ongoing investigation of the fake accounts.

"Putting this matter behind us is in the best interest of all of our stakeholders, including customers," Wells Fargo said in a statement. The bank, which didn't admit liability, said it's making "strong progress" in rebuilding trust, a priority of current Chief Executive Officer Tim Sloan, who was named to the post in late 2016 when his predecessor, John Stumpf, abruptly departed after two contentious Congressional hearings on the fake accounts.

Wells Fargo has grappled with a number of regulatory issues since, and in February, the Federal Reserve barred the bank from further growth until it sufficiently improves its oversight and risk management. The bank's total lending assets were capped at the nearly $2 trillion it held at the end of 2017.

In April, Wells Fargo agreed to pay $1 billion in civil penalties to settle investigations of its automotive- and mortgage-lending practices. The government said the lender had sold some auto borrowers insurance they didn't need under the pretense they might not qualify for the loans otherwise, and charged fees to mortgage customers that it was supposed to be absorbing.

And in August, Wells Fargo agreed to pay $2.09 billion to settle Justice Department allegations that the bank packaged mortgages that were higher-risk than they appeared into securities sold before the 2008 financial crisis. Bank officials were aware that the borrowers had misstated their incomes, the department said, which would impede their ability to repay the loans.

Such securities, which had been awarded the highest credit ratings and were widely held by investors including large Wall Street firms, became impossible to value after a housing bubble began to collapse in 2006 and home owners defaulted on their debt.

Cascading losses in the $15 trillion mortgage market, the largest in the U.S., ultimately spurred the collapse of investment bank Lehman Brothers and forced the government to spend billions on bailouts to shore up the financial system.

Wells Fargo dropped 2.2 percent to $51.73 in New York trading on Monday.