Bank of America Corp said on Thursday that it had modified roughly 56,000 customer mortgages so far this year under the primary U.S. government program aimed at preventing bank foreclosures.

The largest U.S. consumer bank said it had permanently amended nearly 24,000 customer mortgages in April under the U.S. government's Home Affordable Modification Program, or HAMP.

It has completed 600,000 modifications since the beginning of 2008, through a mix of government and bank-sponsored programs.

The government program allows a qualifying borrower to enter into a temporary mortgage modification through the bank, which then modifies the loan permanently after the three-month trial period.

Some politicians and consumer advocates have criticized the HAMP program -- which provides banks incentives to adjust delinquent mortgages -- for not doing enough to stem the tide of U.S. foreclosures.

Bank of America, one of the largest U.S. mortgage lenders, has been the recipient of much of that criticism.

Bank of America Chief Executive Brian Moynihan was both chastised and praised by homeowners at the company's annual meeting in April for its mortgage modification efforts.

Since taking the CEO post on January 1, Moynihan has called the effort to stem the tide of U.S. foreclosures one of the bank's main operational challenges.

Earlier this year, the bank announced plans to cut the principal due for a small subset of subprime mortgages.

Shares of Bank of America were down 4 cents at $17.03 in early trading.

(Reporting by Joe Rauch; Editing by Lisa Von Ahn)