SAN FRANCISCO (AP) _ Bank of America will spend millions of dollars on consumer education, low- income housing and free bank services to settle a suit accusing it of overcharging customers for bounced checks, officials said.

The decision was hailed Friday as creative and far-reaching by Bank of America officials and lawyers handling a class action that accused the bank of overcharging for customers' checks it bounced, dating back to 1973.

''This is a historic settlement that provides a multitude of benefits for bank customers, past and present, and for society as a whole,'' said David B. Baum, a lawyer for the plaintiffs.

''For a public-interest lawyer, this is a dream come true,'' added Sidney M. Wolinsky, who also worked on the plaintiffs' case.

Bank of America Vice Chairman Richard Rosenberg said the settlement ''puts an end to costly litigation on terms that provide a great deal of lasting value to our customers ... at an appropriate cost to the bank.''

Under terms of the agreement, Bank of America will provide $2.5 million for consumer education and $10 million for low-income housing, in the form of interest-free loans to create such housing.

The bank will also provide $25 in free banking services to each of more than 10 million past and present California customers.

The settlement must still be approved by San Francisco Superior Court.

Bank of America has also agreed to pay the lawyers who filed the lawsuit up to $1.4 million in fees and $77,000 in costs. The exact amount will be determined by an arbitrator.

The agreement stems from a 1977 class action filed on behalf of musician Peter G. Rudolfi who got fed up with paying the bank $4 whenever he wrote a check with insufficient funds in his account.

Ironically, the bank has since raised its fee for bounced checks to $10, a level sanctioned by the proposed settlement.