Wells Fargo & Co. settled a lawsuit over claims it mismanaged institutional investors' collateral received as part of its securities lending program, lawyers for both sides told a judge as a trial was close to starting.

Three union retirement plans sued the lender in 2010. Jury selection was to start Monday in St. Paul when the attorneys told U.S. District Judge Donovan Frank that they'd reached an accord. The terms weren't disclosed.

The trial would have been the third for Wells Fargo over its program of temporarily lending an institutional ­investor's holdings to a third party in exchange for collateral that the bank invests with the objective of producing a profit for its client.

The bank lost a $30.1 ­million jury verdict in 2010 then won a trial over an $8.2 million claim last year.

"As we informed you this weekend, the parties have reached a resolution," plaintiffs' attorney Peter Binkow told the judge Monday.

Frank set a June 5 hearing when the parties will present a detailed settlement proposal for preliminary approval.

The retirement plans accused Wells Fargo of breaking its promise to protect the collateral by investing it instead in asset-backed and mortgage-backed securities as well as two structured investment vehicles that later defaulted on their debts.

The bank restated its denial of those allegations Monday in a statement, saying its approach actually minimized losses. "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," said Peggy Gunn, a bank spokeswoman.