In a move that could bring an end to the $40 cup of coffee, Bank of America said on Tuesday that it was doing away with overdraft fees on purchases made with debit cards, a decision that could cost the bank tens of millions a year in revenue and put pressure on other banks to do the same.

Bank officials said that effective this summer, customers who try to make purchases with their debit cards without enough money in their checking accounts will simply be declined. Debit purchases account for roughly 60 percent of overdrafts at Bank of America, the nation’s largest issuer of debit cards.

Banks are bracing for a new federal rule that will require them to get permission from account holders before providing overdraft services for debit purchases and A.T.M. withdrawals. That change was already expected to wipe out billions of dollars in overdraft revenue for the banks.

“What our customers kept telling me is ‘just don’t let me spend money that I don’t have,’ ” said Susan Faulkner, the bank’s deposit and card product executive, who said the overdraft changes were part of a broader push to build trust among its customers. “We wanted to help them avoid those unexpected overdraft fees.”