State Street Corp agreed to pay a $115 million criminal penalty and enter a deferred prosecution agreement to resolve charges the bank defrauded customers by secretly overcharging them for back-office expenses, the U.S. Department of Justice said on Thursday.

According to settlement papers, State Street admitted that from 1998 to 2015 its executives defrauded customers out of more than $290 million through hidden markups.

The Boston-based company also admitted that its executives tried to conceal the markups by leaving the details off invoices and “actively” misleading customers who questioned them.

State Street defrauded customers “in a most pedestrian way: They tacked on hidden markups to routine charges for out-of-pocket expenses,” Acting U.S. Attorney Nathaniel Mendell said in a statement.

The two-year deferred prosecution agreement resolves a wire fraud conspiracy charge, and requires State Street to retain an independent compliance monitor. It also took into account the company’s cooperation and agreement to reimburse victims fully.

“We regret these overcharges,” State Street said in a statement. “We have also invested, and continue to invest, significant resources to improve and strengthen our invoicing processes, controls and governance.”

The bank said it previously set aside funds to cover the settlement.