TD Bank Group said Monday it will pay US$1.2 billion to settle a lawsuit related to one of the largest Ponzi schemes ever orchestrated.

The bank, along with several other financial institutions, was about to face trial in the case in Texas for its alleged role in the $7-billion scheme operated by the Stanford Financial Group.

In agreeing to the settlement, TD denied any liability or wrongdoing and maintained that it acted properly at all times. The bank said it chose to settle the case to avoid the distraction and uncertainty of continuing a long legal proceeding.

TD had provided correspondent banking services to Stanford International Bank Ltd., an offshore bank in Antigua, and had faced allegations of knowing assistance and negligence related to the Ponzi scheme.

In a parallel case against the bank in Ontario, the court ruled in TD’s favour. The ruling was backed up by the Ontario Court of Appeal, while the plaintiffs are trying to appeal the case to the Supreme Court of Canada.

Under the terms of the U.S. agreement, TD has settled with the receiver, the official Stanford Investors Committee and other plaintiffs in the litigation.

TD, which is scheduled to report its first-quarter results on Thursday, said that as a result of the settlement it will take a charge of about C$1.2 billion after tax in the quarter.

The settlement comes as TD works its way through two major acquisitions in the U.S. — the US$13.4-billion First Horizon and US$1.3-billion Cowen Inc. deals — while also facing higher capital expectations from regulators and investors.

National Bank analyst Gabriel Dechaine said that while the settlement could push the bank below the capital buffer expected by investors, he doesn’t expect TD would need to sell shares to make up the shortfall.

The bank could rely either on internal capital generation, or sell down its Charles Schwab Corp. holdings to make up any shortfall, while if it did elect to raise equity it would mean only about a 1% dilution to current shares outstanding, he said.

Barclays analyst John Aiken said the settlement resolves the overhang of the case and that he expects the news to be positive for the bank’s outlook.

“Although the absolute dollar amount is significant, we believe that it was far less than the worst-case scenario envisioned by some in the market,” he said in a note.

The settlement is the latest major charge recorded by Canadian banks from U.S. lawsuits.

CIBC said earlier in February that it would pay US$770 million to settle a lawsuit brought against it by Cerberus Capital Management L.P. related to finance transactions linked to the 2008 financial crisis.

In November, BMO took a US$1.1 billion charge related to a separate Ponzi scheme in Minnesota after a jury awarded damages of about US$564 million against the bank. BMO said at the time it would appeal the decision.

The Ponzi scheme in the TD settlement was run for 20 years by Allen Stanford and involved more than 30,000 accounts. Stanford was sentenced to 110 years in prison for its orchestration.