Bank of America’s brokerage unit has agreed to settle a state regulator’s complaint that it sold inappropriate variable annuities to older seniors in 2003 and 2004.

Bank of America Investment Services Inc., the brokerage unit of the bank, in Charlotte, N.C., says the agreement applies to customers who were 78 years of age or older when they bought the VAs. The company says it agreed to give those customers a chance to get their money back without paying the customary surrender charges.

The agreement with the state’s Securities Division applies to all customers in the age group who bought the VAs in 2003 and 2004 from BAI or its Quick & Reilly subsidiary.

The agreement will be extended to qualified buyers in other states, the company says.

In February, the Massachusetts Securities Division charged Citizens Bank, Providence, R.I., with selling VAs to customers over 75 years old without telling them they would have to pay surrender charges if they cashed in their VAs before they matured.

The division filed similar charges against a number of other banks and brokerage firms, including Bank of America. The bank bought Fleet Bank, Boston, and its Quick & Reilly brokerage unit last year.

The agreement “is a major step toward correcting the abuse of pressuring elderly people into buying these variable annuities without telling them the restrictions that go with them,” said Secretary of the Commonwealth William F. Galvin in a statement.

Bank of America also will provide “an expedited review” of VA sales to customers aged 75 to 77 at the time of purchase to assure the product was suitable to them, according to the agreement. It also agreed to review its VA sales practices, including procedures to screen prospective VA customers for suitability.

The bank says it will offer the same agreement to eligible customers nationwide. And it says it will reimburse any surrender fees paid by eligible customers who previously liquidated VA contracts bought in 2003 or 2004.

The offer will be extended for 6 months beginning in August, BAI says.

“This move is consistent with Bank of America’s continuing commitment to provide its customers with products and services that help meet their financial needs and objectives,” BAI said in a statement.