UPDATE 1-Commonwealth Bank says 'coding error' explains alleged money-laundering breaches

money-laundering breaches@

* CBA accused of 53,700 breaches of anti-money laundering rules

* ATM 'coding error' caused failure to report transactions - CBA

* Other 'serious issues' are unrelated to the coding error - CBA (Adds background and detail of accusations, quotes from CBA statement)

SYDNEY, Aug 7 (Reuters) - The Commonwealth Bank of Australia said on Monday a software "coding error" was responsible for the "vast majority" of the anti-money laundering law breaches it was accused of last week.

The Australian government on Thursday accused the country's biggest mortgage lender of widespread breaches of money-laundering and counter-terrorism financing rules, sending the bank's shares sliding.

Financial intelligence agency AUSTRAC said the bank made 53,700 contraventions of the anti-money laundering and counter-terrorism financing Act, particularly with regards to so-called intelligent deposit machines, or IDMs rolled out in 2012.

The bank said on Monday that a software update installed late in 2012 caused a "coding error" which meant the machines did not create required transaction reports, called threshold transaction reports (TTRs). The error went unnoticed until 2015, the bank said.

"Within a month of discovering it, we notified AUSTRAC, delivered the missing TTRs and fixed the coding issue," Commonwealth Bank said in a statement.

"The vast majority of the reporting failures alleged in the statement of claim (approximately 53,000) relate specifically to this coding error. We recognise that there are other serious allegations in the claim unrelated to the TTRs."

The AUSTRAC case is the biggest of its kind in Australia and the first against a major lender.

CommBank could face fines of hundreds of millions of dollars if convicted. The maximum penalty for contravening the anti-money laundering and counter terrorism financing law is A$18 million ($14.3 million) per breach.

IDMs are a type of automated teller machine that accepts deposits by both cash and cheque, and facilitate anonymous cash deposits. CommBank said the machines are now working correctly, and have been since September 2015.

Shares in the bank tumbled 3.9 percent to A$80.70 on Friday, the lowest since June 13 and the biggest one-day decline in 18 months. The bank issued its statement on Monday before the stock market open.

It previously indicated it would defend itself following the AUSTRAC allegations.

"We do not intend to litigate this matter publicly," it said on Monday. ($1 = 1.2634 Australian dollars) (Reporting by Tom Westbrook; Editing by Susan Fenton)