PHOENIX (AP) - Bank of America will repay tens of thousands of released Arizona prison inmates for what advocacy groups say were excessive charges to access money on debit cards they received when they got out of prison.

Tuesday's settlement in the class-action lawsuit brought by inmates includes an agreement that the bank stop charging the fees. The bank has contracted to provide the debit card services since 2012. About $168,000 will be repaid if all inmates are located.

The bank was charging inmates $15 to withdraw cash from a teller and other fees regular customers weren't charged. The inmates receive the cards loaded with cash they earned at prison jobs when they are released.

BofA called the terms standard for pre-paid cards and said the settlement was in everyone's best interests.