Before her arrest in 2007, Harriette Walters, a midlevel D.C. tax office manager known as “Mother Harriette,” stole more than $48 million from the city, issuing fraudulent tax refunds for almost two decades.

She gambled, making more than 45 trips to Las Vegas and Atlantic City. She spent more than $2 million at high-end shops such as Neiman Marcus. And she hoarded luxury watches in her Northwest Washington home.

Walters was sentenced to more than 17 years in prison in 2009. But her scheme was partly facilitated by Bank of America, where a bank manager deposited almost $18 million in Walters’s refund checks.

Now, eight years after D.C. sued the bank to get its money back, Bank of America is settling the suit for $13 million, the city’s attorney general said Tuesday.

“We are glad that this closes a chapter in the District’s history,” Attorney General Karl A. Racine said in a statement. “The District has made a host of changes in process and personnel to protect against the type of fraud leading to today’s settlement.”

The District’s 2008 lawsuit said Bank of America should “make the District whole for losses suffered because of the Defendant Bank’s wrongful hiring, inadequate training and inadequate supervision.”

The suit pointed out that some checks were cashed even though the payee’s name did not match the account holder’s name, and a Bank of America assistant branch manager, Walter R. Jones, pleaded guilty to his part in the fraud.

“It made no sense to have these large checks being cashed and nothing adding up,” acting D.C. attorney general Peter J. Nickles said when the suit was filed. “It sounds like a bank that would be in Disneyland.”

A spokesman for Bank of America declined to comment.