TORONTO- Toronto-Dominion Bank agreed to pay $41.5 million (C$49.93 million) to settle a U.S. class action lawsuit for charging excess insufficient funds fees on customer accounts, court documents showed.

The settlement includes $20.75 million in cash and an equal amount in debt forgiveness. TD, Canada's second largest lender with large operations in the United States, also agreed to pay $500,000 in expenses, the papers showed. The settlement requires a judge’s approval.

The lawsuit was brought against TD in November 2018 by customers who were charged fees for insufficient funds multiple times when merchants repeated attempts to process the same transaction.

A TD spokeswoman declined to comment.

TD shares were flat at C$88.35 in morning trading in Toronto, compared with a 0.2% decline in the Toronto stock benchmark.

The agreement proposes TD will make the cash payment into the settlement fund within 14 days of preliminary approval, and forgiveness of uncollected fees will be automatic 90 days after the effective date of the settlement.

On May 14, court documents showed Bank of America Corp agreed to pay $75 million to settle a similar lawsuit. 

Separately, TD is awaiting judgment in a trial in an Ontario court in which the liquidators of the collapsed Antigua bank of former Texas financier Robert Allen Stanford are seeking $4.5 billion in damages. 

(1 Canadian dollar = $0.8311)

(Reporting By Nichola Saminather; Editing by Nick Zieminski) ((Nichola.Saminather@thomsonreuters.com; +1-416-687-7604;))