FILE PHOTO: People pass the JP Morgan Chase & Co. Corporate headquarters in the Manhattan borough of New York City, May 20, 2015. REUTERS/Mike Segar/File Photo

NEW YORK (Reuters) - JPMorgan Chase & Co JPM.N will pay $2.8 million to settle charges that a broker-dealer unit lacked sufficient controls to safeguard customer securities from several countries over more than eight years, a U.S. regulator said on Wednesday.

The Financial Industry Regulatory Authority said JPMorgan Clearing Corp created hundreds of millions of dollars of deficits by violating U.S. rules designed to thwart the improper commingling of assets.

Such rules are intended to avoid delays in returning customer securities, or the inability to make customers whole, when broker-dealers fail.

FINRA said the violations occurred from March 2008 to June 2016, and stemmed in part from defective electronic systems that JPMorgan inherited from Bear Stearns Cos, the investment bank it bought in May 2008 in a government-arranged fire sale.

JPMorgan did not admit or deny wrongdoing in agreeing to settle. Brian Marchiony, a spokesman for the New York-based bank, in an email said there were no findings that any client accounts were harmed.

According to settlement papers, JPMorgan failed to properly segregate customer securities from its own assets because of systematic coding and design flaws and a lack of supervision.

FINRA cited as examples how the improper safeguarding of Italian securities for nearly two years and Nigerian securities for four years created respective deficits of $146 million and $120 million.

The fine reflected JPMorgan’s “extraordinary” cooperation in addressing the violations, and its practice of setting aside excess deposits to protect customers from losses, FINRA said.