Wells Fargo & Co. has agreed to pay $62.5 million to settle class action claims by a group of retirement funds that the bank breached its fiduciary duty and engaged in fraud in its securities lending program.

The settlement announced Friday is the latest in a series of high-stakes cases against the bank over a largely defunct program that was managed out of Minneapolis.

The agreement now heads to U.S. District Judge Donovan Frank in St. Paul for preliminary approval. A hearing is set for Thursday.

Wells Fargo was accused of playing fast and loose with the multibillion-dollar securities lending program, which the plaintiffs said was sold to them as a very conservative vehicle for making a little extra money to cover expenses of maintaining their portfolio.

Instead, from 2006 through 2008 Wells Fargo managers allegedly were making risky bets on complicated and frequently illiquid investments, parking client money in such things as structured investment vehicles run by hedge funds and pools of subprime mortgages.

When the economy and finance markets spun into crisis, many of the deals went toxic and cratered.

The bank marketed its securities lending program for years to big institutional investors, such as foundations, pension funds and insurance companies. In it, the bank would lend out the securities the clients held to third-party broker-dealers.

The bank received cash collateral for lending the securities to the brokers, then invested the money and split the returns with the institutional investors.

The plaintiffs include the City of Farmington Hills Employees Retirement System, a Michigan pension fund; the board of trustees of the Arizona State Carpenters Pension Trust Fund; and the Arizona State Carpenters Defined Contribution Trust Fund. The entire class covers 92 investor entities, including many retirement funds.

Carolyn Anderson at Zimmerman Reed in Minneapolis, co-lead counsel for the plaintiffs, said her clients are pleased.

“On the eve of trial, faced with a substantial settlement offer from Wells Fargo, our clients decided that a positive outcome now — that provides substantial benefit to the class — is preferable to an uncertain outcome and years of delay,” Anderson said via e-mail. “There is definite value in certainty and closure.”

The four law firms representing the plaintiffs have asked for up to one-third of the settlement as payment, plus an additional amount up to $2.45 million for litigation expenses.

San Francisco-based Wells Fargo has maintained that it did nothing wrong.

“Wells Fargo was focused at all times on serving our clients’ interests and we worked very hard and responsibly to achieve the best results for all of the participants in the program during very difficult economic conditions,” the bank said in an e-mailed statement. “This conservative approach resulted in plaintiffs’ Wells Fargo Securities Lending portfolios having minimal losses of five percent or less,” the bank said, “compared to substantial losses experienced by other investors during the height of the financial crisis.”

Two other investor lawsuits over the bank’s program went to trial.

Wells Fargo lost the first in 2012 after a jury trial in Ramsey County District Court and awarded a total of $57 million to a group of Twin Cities charitable foundations. It won the second one last year in federal court in St. Paul following a jury trial.

As with the previous case, the plaintiffs were divided into two groups: those covered by the Employment Retirement Income Security Act (ERISA) and non-ERISA plaintiffs. The 30 ERISA plaintiffs were allowed to bring only one claim, which was breach of fiduciary duty.

The 62 non-ERISA plaintiffs brought three claims: breach of fiduciary duty, breach of contract and violations of the Minnesota Consumer Fraud Act.