Nearly four years after the disastrous implosion of investment bank Lehman Brothers, regulators punished JPMorgan Chase (JPM) on Wednesday for actions the financial giant took tied to Lehman’s demise.

The Commodity Futures Trading Commission launched a civil case against JPMorgan, accusing the No. 1 U.S. bank by assets of unlawfully handling customer segregated funds of Lehman Brothers. 

New York-based JPMorgan agreed to pay a fine of $20 million to settle the case, but is not admitting nor denying any wrongdoing.

The CFTC suit against JPMorgan, which served as Lehman's clearing agent, marks the government's first enforcement action tied to the collapse of Lehman. 

“The laws applying to customer segregated accounts impose critical restrictions on how financial institutions can treat customer funds, and prohibit these institutions from standing in the way of immediate withdrawal,” David Meister, director of the CFTC’s Division of Enforcement, said in a statement. “As should be crystal clear, these laws must be strictly observed at all times, whether the markets are calm or in crisis."

The CFTC, which earlier this week filed a huge lawsuit against Royal Bank of Canada (RY), accused JPMorgan of overextending credit to Lehman in the two years before its collapse. The regulator believes JPMorgan improperly valued Lehman’s worth by improperly counting the company’s customer money.

At the same time, the CFTC accused JPMorgan of withholding separate Lehman customer cash for almost two weeks instead of giving it to authorities. The CFTC says JPMorgan only released the funds after demands from agency officials.

JPMorgan stressed that no customer funds were ever used to satisfy Lehman debt to JPMorgan nor were any customer funds in these accounts ever lost. 

"The firm cooperated with the investigation and is pleased to have resolved this matter with the CFTC," JPMorgan said in a statement. 

Shares of JPMorgan slumped 3.06% to $44.02, outpacing a 1.25% late morning decline on the S&P 500.

The questions about JPMorgan’s conduct come months after the collapse of futures brokerage MF Global and subsequent vanishing of some $1.6 billion of customer cash. While JPMorgan also served as the clearing agent of MF Global, it hasn’t been accused of any wrongdoing in that episode.

Lehman’s September 2008 demise helped exacerbate the financial crisis, pushing the U.S. government to launch a massive taxpayer-funded rescue operation.

Follow Matt Egan on Twitter @MattMEgan5