SAN FRANCISCO (AP) — Wells Fargo says a company mistake contributed to hundreds of foreclosures because it miscalculated customers’ eligibility for mortgage modifications.

The bank said in a filing Friday the error caused about 625 customers to be denied, or not offered, loan modifications they otherwise qualified for. Foreclosures were completed in about 400 cases.

READ MORE: Late Rally Fizzles, Warriors Fall to Spurs 112-107

The customers had been using federal programs that helped families at risk of losing homes. A spokesman didn’t immediately respond to a question about where the foreclosures were.

The error in the bank’s underwriting tool lasted from 2010 until it was fixed in late 2015, an internal review found.

READ MORE: King Tide Flooding on SF Waterfront Foreshadows Future Climate Change Norm

The bank said it set aside $8 million this year to help the affected customers.

With its main corporate office in San Francisco, the bank employs thousands in Charlotte.

MORE NEWS: North Bay Organizations Unite for Holiday Toy Drive

© Copyright 2018 Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed