The regulator said the bank, known as HBL, agreed to pay just over a third of that sum as part of a broader settlement in which it will shutter its New York branch, subject to conditions.

The New York State Department of Financial Services on Thursday said Pakistan’s Habib Bank had agreed to pay $225 million to settle an enforcement action brought against it for infringing laws designed to combat illicit money transfers.

The DFS said in a legal filing last month it was seeking to fine the bank, Pakistan's biggest lender, up to $630 million for “grave” compliance failures over anti-money laundering and sanctions rules at its only U.S. branch.

The regulator said the bank, known as HBL, agreed to pay just over a third of that sum as part of a broader settlement in which it will shutter its New York branch, subject to conditions.

These include submitting to a DFS investigation of transactions processed by the branch from October 2013 to the end of September 2014, and from April 2015 through the end of July 2017.

In a statement HBL said it “remains committed to strengthening its compliance processes, operations and controls” across its 1,700 branches.

Shares of HBL surged 5 %, to 160.58 rupees per share, amid investor relief that the fine was not larger than $225 million.

Thursday's announced settlement does not preclude further future enforcement action if the DFS investigation reveals further problems.

The enforcement action followed a 2016 review in which the regulator said it found “weaknesses in the banks risk management and compliance” that management had failed to tackle.

The review showed HBL had failed to properly screen thousands of transactions and had processed payments for known criminals and sanctioned entities, among other failings.

“The bank has repeatedly been given more than sufficient opportunity to correct its glaring deficiencies, yet it has failed to do so,” Financial Services Superintendent Maria Vullo said in the statement.

“DFS will not stand by and let Habib Bank sneak out of the United States without holding it accountable for putting the integrity of the financial services industry and the safety of our nation at risk.”

HBL disclosed it was in negotiations with the DFS last month and said the potential fine and closure of its New York branch would have no material impact on its business outside the United States.

“HBL is pleased to have this matter behind it and has begun the orderly wind-down of its New York operations,” Matthew Biben, a partner at Debevoise & Plimpton LLP and the bank's U.S. lawyer, said in a statement.

“HBL believes that the opportunity to resolve this matter consensually at this time is in the best interests of its investors, shareholders and customers. HBL remains committed to strengthening its operations and controls.”

The DFS said a court hearing set for later this month had been canceled as part of the settlement.

Pakistani brokerage firm Intermarket Securities said the hefty fine would hurt profits and could force HBL to issue foreign-currency subordinated debt to pay the regulator.

But the sum was “manageable” and the medium-term outlook for the bank should not be affected, it said in a research note.

“Under the circumstances, we believe it makes sense for the bank to take this one-off hit, rather than approaching courts which would have put the share price under a cloud for longer.”