H&R Block Inc. agreed to pay as much as $20.2 million to customers that bought its Express IRAs to settle a federal lawsuit that alleged the relatively small accounts were virtually guaranteed to lose money because they charged high fees.

The settlement, which was announced Monday by New York Attorney General Andrew Cuomo, said that the U.S. tax preparer will refund $11.4 million to $19.4 million in fees and pay $750,000 in fines to the state. The Kansas City, Mo., company will also convert the Express IRA accounts into a new retirement account program that doesn’t charge fees, according to a statement by Cuomo.

The settlement is a result of a lawsuit filed by Cuomo’s predecessor, Eliot Spitzer, in U.S. District Court in Manhattan in 2006. The suit, New York v. H&R Block Inc., claimed H&R Block encouraged clients to put tax refunds into Express IRA’s, but the fees associated with the account exceeded earnings.

Since 2000, Cuomo said H&R Block opened more than 600,000 such accounts and 85% of those who opened the accounts paid more in fees than they earned in interest.

"H&R Block's aggressive peddling of fee-laden retirement accounts that were virtually guaranteed to lose money needlessly cost families across the country millions of their hard-earned dollars," Cuomo said in a statement.

H&R Block did not return calls seeking comment.

Spitzer originally sought $250 million of civil penalties and other remedies. His lawsuit had said the average Express IRA account had a balance of $323. The account charges investors a $10 annual maintenance fee, a $15 set-up fee, a $15 "re-contribution" fee and $25 in termination fees.