(Reuters) - Bank of America Corp (>> Bank of America Corp) agreed to pay a total of $15.5 million in fines to settle charges by U.S. regulators and exchanges that lapses in its Merrill Lynch unit's risk controls disrupted trading in 15 stocks, leading to "mini-flash crashes."

The U.S. Securities and Exchange Commission on Monday imposed a record $12.5 million fine for violating its market access rule, which requires brokerages that give customers direct market access to have risk controls designed to stop erroneous or excessively large trades.

Several exchanges, including the New York Stock Exchange, Nasdaq and BATS, announced a related $3 million fine against Bank of America.

The second-largest U.S. bank by assets was sanctioned for allowing sudden, unexplained swings in companies' stock prices between 2012 and 2014, including 99 percent drops in Anadarko Petroleum Corp (>> Anadarko Petroleum Corporation) and cloud security company Qualys Inc (>> Qualys Inc) and a 3 percent decline in Google, now known as Alphabet Inc (>> Alphabet Inc).

Bank of America did not admit wrongdoing.

A spokesman, Bill Halldin, said the erroneous trades were canceled in "most instances," and the bank was unaware of any clients being harmed. He also said Merrill believes its controls are compliant with current rules and regulators' expectations.

The SEC adopted the Market Access Rule in 2010 after a May 6 "flash crash" caused the Dow Jones Industrial Average to plunge about 1,000 points in a few minutes. It quickly recovered much of the decline.

According to the SEC, Merrill violated that rule because it set the thresholds at which trades could be stopped at unreasonably high levels.

Anadarko's plunge occurred on May 17, 2013, when its stock price fell to 1 cent from more than $90 in less than a second.

The SEC said this occurred when a trader, concerned that a 400,000-share sell order might not be processed, entered a new order to sell 150,000 shares without canceling the first order. Merrill's controls did not raise a red flag because they would have allowed a 10 million share order, the SEC said.

Such mini-flash crashes "can undermine investor confidence in the markets," SEC enforcement chief Andrew Ceresney said in a statement.

Knight Capital Group Inc, now part of KCG Holdings Inc (>> KCG Holdings Inc), agreed to a $12 million fine in October 2013, the SEC's largest prior penalty for violating the market access rule. Goldman Sachs Group Inc (>> Goldman Sachs Group Inc) and Morgan Stanley (>> Morgan Stanley) have also been fined.

(Reporting by Jonathan Stempel and Suzanne Barlyn; Editing by Lisa Von Ahn and Andrew Hay)

By Suzanne Barlyn and Jonathan Stempel