Nasdaq has agreed to pay $10 million, the largest penalty ever lodged against an exchange, to settle civil charges concerning its handling of Facebook's market debut a year ago, which was marred by technical problems.

In a filing released Wednesday, the Securities and Exchange Commission accused Nasdaq of failing to ensure that its systems were running properly before initiating the Facebook trades and making "ill-fated" decisions that violated the exchange's rules.

Nasdaq's technology failed to match buy and sell orders, creating huge disruptions in early trading May 18, 2012, when 30,000 Facebook orders got stuck in the system, the SEC said. The exchange's leadership team recognized the problem but did not halt trading because they thought the issues were fixed after a few lines of computer code were removed.