Wells Fargo & Co. is spending at least $83 million to settle class action claims that it engaged in robo-signing of foreclosure documents.

The settlement relates to lawsuits that shareholders filed in 2011 against the San Francisco-based lender and its board of directors, claiming they breached their fiduciary duty to shareholders. The cases were consolidated and given class action status.

In a government filing Friday, the bank said it denies the claims of wrongdoing and liability and is settling to avoid further litigation.

The bank said it will spend at least $36.5 million toward a new down-payment assistance program for first-time home buyers in select cities hit hard by the foreclosure crisis, such as Detroit and St. Louis. The Twin Cities, where Wells Fargo is the largest bank by deposits, is not included in the group.

At least $6 million will go toward counseling Wells Fargo borrowers who are delinquent on their mortgages.

The bank will also spend at least $24.5 million integrating various computer systems for servicing home loans into a unified Wells Fargo Home Mortgage servicing platform. The platform should be up and running by the end of 2015, it said.

It also agreed to pay the plaintiffs’ lawyers $16 million in fees and expenses.

In an e-mailed statement, Wells Fargo said the bank and its directors are “pleased to have resolved the matter.”

“We remain committed to our efforts to assist borrowers facing financial challenges and believe this settlement benefits the company, our customers and our shareholders,” the statement said.

Revelations that banks engaged in mass robo-signing of foreclosure-related paperwork without checking for accuracy rocked the nation and were the focus of a landmark $25 billion national mortgage settlement in 2012 between the country’s top five mortgage servicers and state and federal authorities.

Wells Fargo still faces considerable litigation related to its mortgage servicing and foreclosure activities.

The latest swirl of controversy involves allegations that it developed a sort of how-to manual for generating bogus documents to justify foreclosing on homes. A bankruptcy lawyer for two separate homeowners, each suing Wells Fargo in federal court in the Southern District of New York, claims the 150-page guide gives step by step instructions for lawyers the bank hires to get after-the-fact paperwork, or endorsements, to show loans were signed over to the bank.

Judges in both cases have ruled that Wells Fargo cannot keep its home mortgage foreclosure attorney procedure manual out of court and will have to answer questions about it, said bankruptcy lawyer Linda Tirelli, who represents both homeowners.

Wells Fargo has denied any wrongdoing.

A hearing to finalize Wells Fargo’s shareholder settlement is scheduled for July 25 in U.S. District Court in the Northern District of California.