Bank of America agreed Wednesday to pay $772 million in fines and refunds to settle regulators' accusations that it misled customers who bought extra credit-card products and illegally charged others for credit monitoring and reporting services they didn't receive.

The Consumer Financial Protection Bureau (CFPB) and the U.S. Office of the Comptroller of the Currency announced the agreement with Bank of America, the second-largest U.S. bank.

It is the largest settlement over credit card "add-ons" won by federal regulators, who have been examining the marketing of the products by the financial industry for several years. It also marked the biggest refund amount ordered to date by the CFPB, a consumer watchdog agency created by Congress in the wake of the 2008 financial crisis. The agency has operated since mid-2011.

The regulators said about 2.9 million customers were affected in the Bank of America case. They alleged telemarketers made sales pitches for two credit-protection products that were misleading about their costs and benefits.

Bank of America, which is headquartered in Charlotte, N.C., neither admitted nor denied the allegations. The bank said in a statement that it had already issued refunds to the majority of affected customers. Bank of America also said it stopped selling identity-theft protection products in December 2011, and terminated in August 2012 products offering debt relief for customers who lost their jobs or suffered other hardships.

The bank marketed two credit protection add-on services from 2010 through 2012 that allowed customers to ask for some credit-card debt to be canceled if they lost their jobs or suffered other hardship. The regulators said the telemarketers often went off script to make sales pitches that were misleading and left out important information. For example, some customers were falsely led to believe they'd be entitled to a $25,000 "death benefit" by taking Credit Protection Plus. Rather than being automatically awarded as portrayed, customers had to complete an approval process to receive the benefit, the regulators said.

Bank of America was also accused of billing customers for several identity-theft protection products without getting their authorization or prior to getting it.

Of the $772 million in refunds, about $459 million is going to some 1.5 million consumers who enrolled in the credit monitoring products and were said to be wrongly charged. The bank is also paying a $20 million penalty to the CFPB and a $25 million penalty to the Office of the Comptroller of the Currency, a Treasury Department agency.

"We will continue to be vigilant in pursuit of anyone who deceives or mistreats consumers," CFPB Director Richard Cordray said in a conference call with reporters. "We intend to continue cleaning up this market as necessary to ensure that consumers are treated fairly."

The accord with Bank of America was the latest of several signed by the bank to resolve its legal and regulatory problems. It agreed last month to spend $9.3 billion to resolve a dispute over mortgage securities with the Federal Housing Finance Agency, which regulates big mortgage financers Fannie Mae and Freddie Mac.

Also last month, Bank of America and its former chief executive Kenneth Lewis reached a $25 million settlement to end an investigation by New York state's attorney general into their conduct during the 2008 acquisition of Merrill Lynch & Co. The civil fraud lawsuit accused them of failing to disclose Merrill's losses and bonuses before the deal closed. Last year, Bank of America settled a related class-action shareholder lawsuit for $2.43 billion.

Shares of Bank of America rose 18 cents on Wednesday to $16.62. Its shares have risen more than 5.6 percent so far this year.

Wire services