U.S regulators have fined Bank of America $30 million for violating consumer protection for members of the military in collecting debts.

The Office of the Comptroller of the Currency, a Treasury Department division, announced the civil penalty Friday against the second-largest bank in the U.S., Military Times reported.

Regulators say the bank made improper legal action against military customers for delinquent credit card accounts and overdrafts. It also failed to have effective policies and procedures that should have ensured its compliance with the Service Members Civil Relief Act.

Interest banks are limited in some cases in how much they can charge deployed service members. For example, lenders aren't allowed to repossess deployed military members' cars or foreclose on their homes without a court order, according to The New York Times.

The bank has cooperated with the regulators and said it will continue to work within the law and be more transparent with its policies.

"We have taken significant steps over the last several years, and will take further steps now, to ensure we have the right controls and processes in place to meet - and exceed - what is required by law and what our military customers deserve and expect," Andrew Plepler, the bank's executive in charge of social responsibility and consumer policy, said in a statement, the Daily Journal reported.