Bank of America will pay $ 10 million for improperly blocking customer accounts.

Bank of America is paying $ 10 million to settle a regulator’s claim that it illegally helped some creditors wring funds from its clients’ accounts, the Consumer Financial Protection Bureau said Wednesday.

The office, which filed the lawsuit against the bank, said Bank of America forced clients to accept contracts that limited their ability to fight creditors’ actions. In 3,700 cases, the Bureau said, Bank of America also charged clients a total of just under $ 600,000 in “foreclosure fees” for processing their creditors’ fund extraction requests.

“Bank of America has imposed illegal seizure fees and harmed its clients by inserting unenforceable clauses in contracts in an attempt to take away legal rights from families,” said Rohit Chopra, director of the office.

William Halldin, a spokesman for Bank of America, said the bank was reimbursing customers in the 3,700 cases. “We have improved our processes to ensure compliance with all applicable state laws while carrying out court orders,” he said.

From 2011 to 2016, Bank of America executed about one million seizure requests from creditors, Halldin said.

At the heart of the consumer bureau case was the bank’s response to state laws that restricted creditors’ ability to withdraw funds from client accounts.

In some states, it is illegal to take so much money to meet a court-ordered payment obligation that the debtor has nothing left to live on. Different states allow debtors to withhold different amounts that creditors under court orders cannot touch.

The location of a customer’s bank account in one state or another can greatly affect the amount of money creditors can withdraw from it. The consumer bureau said Bank of America did not apply the correct restrictions to some of its customers and wrongly told customers that the location of the court that issued the recovery order mattered more.