Standard Chartered PLC agreed to pay $340 million to a New York regulator to settle allegations that the bank broke U.S. money-laundering laws in handling transactions for Iranian customers, after a weeklong, trans-Atlantic regulatory drama.

The sum is the largest fine ever collected by a single U.S. regulator in a money-laundering case. The agreement came just eight days after the regulator, Superintendent Benjamin M. Lawsky of the state Department of Financial Services, stunned the banking world, and fellow U.S. regulators,...