U.S. securities regulators have settled with Knight Capital, over allegations that it violated market access rules when a software glitch caused out of control trading that almost sank the firm.

The U.S. Securities and Exchange Commission (SEC) said Wednesday that Knight Capital Americas LLC has agreed to pay US$12 million to settle charges that it violated the market access rule in connection with a trading incident that occurred on Aug. 1, 2012, that disrupted the markets. It says that its investigation found that Knight Capital “did not have adequate safeguards in place to limit the risks posed by its access to the markets, and failed as a result to prevent the entry of millions of erroneous orders. Knight Capital also failed to conduct adequate reviews of the effectiveness of its controls.”

According to the SEC’s order, the firm made two critical mistakes that led to the trading incident — it moved a section of computer code in an automated equity router that left it unable to recognize when orders had been filled; and that it failed to act on automated email alerts generated by the faulty code problem before the markets opened. As a result, during the first 45 minutes after the market opened on Aug. 1, Knight Capital traded more than 397 million shares, acquired several billion dollars in unwanted positions, and eventually suffered a loss of more than $460 million.

The SEC’s order requires Knight Capital to pay a $12 million penalty and retain an independent consultant to conduct a comprehensive review of the firm’s controls and procedures to ensure compliance with the market access rule. It notes that the firm consented to the order, without admitting or denying its findings.

“The market access rule is essential for protecting the markets, and Knight Capital’s violations put both the firm and the markets at risk,” said Andrew Ceresney, co-director of the SEC’s division of enforcement. “Given the rapid pace of trading in today’s markets and the potential massive impact of control breakdowns, broker-dealers must be held to the high standards of compliance necessary for the safe and orderly operation of the markets.”