MIAMI — A federal judge Monday gave final approval to a $410 million settlement in a class-action lawsuit affecting more than 13 million Bank of America customers who had debit card overdrafts during the past decade.

Senior U.S. District Judge James Lawrence King said the agreement was fair and reasonable, even though it drew criticism from some customers because they would only receive a fraction of what they paid in overdraft fees. The fees were usually $35 per occurrence.

“It’s really undisputed that this is one of the largest settlements ever in a consumer case,” said Aaron Podhurst, a lead attorney for the customer class.

Bank attorney Laurence Hutt said 13.2 million Bank of America customers who had debit cards between January 2001 and May 2011 would get some payment. Those who still have accounts would get an automatic credit, and the others would get a check mailed to them. No one would have to take any action or fill out any paperwork.

Barry Himmelstein, an attorney for customers who objected to the deal, said he calculated that the bank actually raked in $4.5 billion through the overdraft fees and was repaying less than 10 percent.

He said the average customer in the case had $300 in overdraft fees, making them eligible for a $27 award – less than one overdraft charge – from the lawsuit.

“It’s $4.5 billion that’s gone missing from people’s accounts,” Himmelstein said.

Hutt said only 46 customers filed formal objections to the settlement and 350 decided to opt out, meaning they could take separate legal action on their own.

“It’s very easy for people to say on the sidelines, ‘I could do better,’ ” Hutt said. “Never is a settlement at 100 percent of what somebody thinks they can receive at trial. It’s always a compromise.”

Customers will receive a minimum of 9 percent of the fees they paid through the settlement, Hutt said. The bank has already paid the money into an escrow account.

The lawsuit claimed that Bank of America processed its debit card transactions in the order of highest to lowest dollar amount so it could maximize the overdraft fees paid by customers. An overdraft occurs when the account doesn’t have enough money in it to cover a debit card transaction. Similar lawsuits have been filed against more than 30 other banks.

Despite the settlement, Bank of America insists there was nothing improper about the processing sequence. New regulations enacted after the recent financial crisis prohibit banks from charging overdraft fees on debit cards without first getting customer permission.

Many of the objections concerned the fees for the team of class-action attorneys, which would amount to about $123 million. Lawyers for the settlement’s critics said that amount should be cut by at least $50 million, with the money going back to the wronged customers. But the judge noted that the plaintiffs’ attorneys spent thousands of hours on the case and achieved “a superb result” for the customers.