The Federal Reserve raised its limit Wednesday on how much merchants must pay to banks each time a debit card is swiped, an eleventh-hour reprieve for the financial industry after a massive lobbying campaign.

The so-called swipe fee, or interchange, will increase from a maximum of 12 cents proposed by the Fed last year to a base charge of 21 cents. Banks can also collect .05 percent of the amount of the transaction to recoup losses from fraud. In addition, the Fed will consider allowing them to receive another cent for each transaction if they take steps to prevent fraud. The new rules will take effect Oct. 1.

Congress directed the Fed to craft the regulations as part of sweeping reforms of the financial system passed last year. But in voting on the rule, the Fed expressed its distaste for such a hands-on approach to the marketplace.

Members of the board of governors repeatedly referred to the 11,000 public comments received on the issue and the staff hours required to address it. Fed Governor Elizabeth Duke noted that the board was unable to take on other issues, such as protections for prepaid cards, while Chairman Ben S. Bernanke called the approach the “best available solution.”

The fees have long been a sore point between merchants and banks, sparking battles in the nation’s courts and on Capitol Hill. But it gained traction as the global financial meltdown turned banks into political pariahs, and a wave of populist legislation passed to curtail fees on everything from credit cards to bank overdrafts.

The lost revenue made swipe fees even more critical to the industry’s bottom line. The fees generated $16.2 billion in 2009, and banks used them partly to fund popular debit-card rewards programs and offset the cost of free checking accounts that maintained low balances. The financial industry waged an aggressive campaign to stop the law — plastering Metro cars with ads and funneling donations to key politicians — but the effort came up short this month when banks failed to win enough votes in the Senate to secure a delay.

Instead, the industry looked to the Fed for relief. Last week, the American Bankers Association sent a letter to Bernanke asking him to consider the cost of maintaining the network to process debit card transactions, customer service expenses and fraud losses, among other things. Each of those categories was included in the Fed’s revised calculations that boosted the limit on swipe fees.

“It is clear that the board benefited from the input of bankers, policymakers and other commentators,” Frank Keating, ABA president and chief executive, said in a statement Wednesday.

Still, banks were far from satisfied. The Fed said it expects banks’ revenue from swipe fees to drop by more than 40 percent. Duke said the decline of free checking accounts was a “seemingly unavoidable” consequence.

“While the Fed’s rule is a pleasant surprise, the fact remains Congress prohibited banks from recouping their costs associated on their own product,” said Richard Hunt, president of the Consumer Bankers Association.

Retailers were enraged by the Fed’s move, which nearly doubled the cap proposed in its original draft. Merchant trade groups accused the regulator of buckling amid pressure from banks. Mallory Duncan, senior counsel for the National Retail Federation, said that he was “extremely disappointed” and that the Fed included inappropriate costs in its calculation.

“The board has really abdicated the first responsibility of a government agency, which is to follow the law,” he said.

The Fed acknowledged Wednesday that the rule had several flaws but said it was hamstrung by the legislation’s requirements. For example, although the law exempts banks with less than $10 billion in assets from the new rule, the board said they may still feel its effects.

Also unclear was whether consumers would see any savings from lower swipe fees — or if those discounts would be offset by higher charges from banks.

“The ultimate beneficiary, we hope, is the consumer,” Bernanke said.