Standard Chartered, the British bank, has agreed to pay New York’s top banking regulator $340 million to settle claims that it laundered hundreds of billions of dollars in tainted money for Iran and lied to regulators.


The agreement is a victory for Benjamin M. Lawsky and his 10-month old agency, the New York Department of Financial Services, which took on the bank alone in charging that it schemed for nearly a decade with Iran to hide from regulators 60,000 transactions worth $250 billion.


The deal, however, has the potential to undercut a sweeping settlement between the bank and federal regulators, including the Federal Reserve and the Treasury Department. They are also investigating Standard Chartered, a 150-year-old bank based in London with operations across the globe.


The $340 million deal is a huge amount for a single state regulator, and it falls near the middle of the collective settlements that the Justice Department and the Manhattan district attorney have reached with other global banks in recent years over money laundering charges, from $619 million with ING bank in June to $298 million with Barclays in 2010.


Standard Chartered has maintained that only $14 million of the $250 billion in transactions violated federal regulations. In a statement announcing the settlement, Mr. Lawsky said, “The parties have agreed that the conduct at issue involved transactions of at least $250 billion.”


The bank has not admitted any wrongdoing, and it said in a regulatory filing Tuesday that “a formal agreement containing the detailed terms of the settlement is expected to be concluded shortly.” Standard Chartered “continues to engage constructively with the other relevant U.S. authorities. The timing of any resolution will be communicated in due course,” the filing said.


After frantic negotiations with Mr. Lawsky’s office, which threatened to revoke the bank’s state license at a hearing scheduled for Wednesday, Standard Chartered made a calculation to settle, in part, to resolve the public relations headache, according to people briefed on the matter.


The agreement ends a weeklong international drama that thrust the upstart regulator into the spotlight and pitted Mr. Lawsky against federal authorities who thought he was overstepping his bounds and British authorities who accused him of tarnishing the reputation of their banks.


The size of the settlement is puzzling to some federal officials, including the Justice Department, because there is still widespread disagreement about the extent of the bank’s wrongdoing, according to regulators briefed on the matter.


In the weeks leading up to Mr. Lawsky’s move against the bank, the Justice Department was on the brink of deciding not to pursue criminal charges, after concluding that virtually all of the transactions with Iran had complied with United States law, current and former authorities said.


Until 2008, federal law allowed foreign banks to transfer money for Iranian clients through their American subsidiaries to another foreign institution. Mr. Lawsky claimed the 60,000 transactions occurred from January 2001 through 2007, as United States authorities suspected Iranians of using their banks to finance terrorism and nuclear weapons development.


Standard Chartered maintains that “99.9 percent” of the transactions under scrutiny involved legitimate Iranian banks and corporations and that none of the payments had anything to do with supporting terrorist activities. Because the bank did not properly report the transactions that had been routed through its New York branch, Mr. Lawsky’s office has said it was impossible to know how the money was used by the Iranians.


Mr. Lawsky based his case, in large part, on claims that the bank had violated state law by masking the identities of its Iranian clients, lying to regulators and thwarting American efforts to detect money laundering.


Particularly difficult for the bank, people with knowledge of the settlement talks said, was a trove of e-mails and memos detailing an elaborate strategy devised by the bank’s executives. An e-mail from a lawyer to bank executives in 2001 said that payment instructions for Iranian clients “should not identify the client or the purpose of the payment,” according Mr. Lawsky’s order.