NEW YORK — Bank of America on Tuesday abandoned plans to charge $5 a month for debit cards after a nationwide backlash from consumers and lawmakers.

The bank canceled the fee, which would have started in January, after listening “to our customers very closely,” David Darnell, co-chief operating officer, said in a statement Tuesday. The lender also cited competitive pressure.

Bank of America reversed course after rivals including JPMorgan Chase and Wells Fargo decided against similar charges, leaving the Charlotte, N.C.-based firm the only U.S. lender among the biggest five with plans to introduce the fee. Citigroup and U.S. Bancorp had already rejected the idea, while SunTrust Banks and Regions Financial eliminated their check-card fees Monday.

“For a lot of consumers, this was the last straw,” said Jean Ann Fox, director of financial services for the Washington-based Consumer Federation of America. “Banks have been making a lot of changes to accounts, adding fees and raising the minimum balance needed, and consumers were clear that they objected to one more fee.”

Card issuers must now seek other ways to replace revenue lost after the government capped fees on debit-card transactions last month at about half the previous level. The limits, mandated by the Dodd-Frank Act, may cut annual revenue by $8 billion at the biggest U.S. banks, according to data compiled by Bloomberg Government.

The cap was backed by some of the largest chain stores, and the Retail Industry Leaders Association said in a statement Tuesday that the Arlington, Va.-based trade group plans to push for similar relief on credit cards.

Lenders will “find more subtle ways to make up for this lost revenue, increases that may fly under the radar,” said Bill Hardekopf, CEO of Birmingham, Ala.-based research firm “Banks may increase existing fees or raise the introductory interest rates on credit cards.”

Chief Executive Officer Brian Moynihan, 52, had defended Bank of America’s plans, saying Oct. 18 that the debit-card fee would encourage customers to use more services with the company so they’d be exempt.

The charges had fueled demonstrations in Los Angeles and Boston and prompted a Washington woman to collect more than 300,000 petitions in protest. President Obama criticized the moves as “not necessarily fair to consumers,” and Rep. Brad Miller, a North Carolina Democrat and member of the Financial Services Committee, introduced a bill last month that would make it easier to switch banks.

Bank of America said Sept. 29 it would charge customers with less than $20,000 in total balances or those lacking a mortgage or Merrill Lynch brokerage account for debit cards, drawing criticism that lower-income customers would be affected most.