AP File PhotoA Bank of America customer is shown here using an ATM machine in Mountain View, Calif., last month. When Bank of America next year starts charging customers a $5 monthly fee to swipe their debit cards, the 38.7 million people who carry them will have to decide if the convenience is worth the money.

Boston police arrested about two-dozen people at an anti-foreclosure rally outside Bank of America Corp.'s downtown headquarters Friday afternoon, according to published reports.

Hub police claimed the arrests were made mostly for trespassing and that none of the protesters resisted being taken into custody, according to reports by the Boston Globe and the Boston Herald.

The group that led the protest -- Right to the City Alliance -- issued a statement claiming it stands for economic justice, noting that the Charlotte, N.C.-based banking giant will next year begin charging a monthly $5 user fee for debit cardholders.

Activists said several thousand protesters took part in the rally, voicing support for homeowners who are fighting foreclosure and opposition to the bank's lending practices. The rally morphed into a sit-in protest, with activists facing arrest if they refused to budge for police.

“The numbers that came out today were awe-inspiring,’’ Jason Stephany, a spokesman for the activist group MassUniting, told the Boston Globe. “It is a testament to the gravity of the situation. People are hurting. This is only the first step in a long journey.’’

Bank of America spokesman T.J. Crawford said demonstrators unfairly targeted the bank -- the nation's largest -- saying the lender has undertaken major efforts to help homeowners modify loans and stay in their homes.

Standing near Dewey Square on Friday afternoon, Boston Police Commissioner Edward F. Davis characterized the large group of activists as a peaceful bunch, even "a great group."

“They wanted to be arrested, and we obliged,” he told the Boston Herald.

Bank of America's strategy to implement a fee for debit card use follows tests by Wells Fargo and Chase, both of which have instituted $3 monthly fees in some markets. Other banks have begun charging for basic checking, with many sharply restricting rewards programs for debit cards.

Bank of America says the fees won't apply if cards only are used to access ATMs, or if cardholders are premium customers with high account balances. The fee will be incurred, however, when customers use their debit cards for purchases in certain months.

The introduction of user fees is particularly painful for bank customers, especially since many lending institutions have spent the past decade encouraging customers to embrace the cards, known for their convenience.

Most card users simply have their purchases immediately deducted from their checking or savings accounts, essentially eliminating the need for carrying cash.

Material from the Associated Press, Boston Globe and Boston Herald was used in this aggregation post.