ALBANY, N.Y.—  An agreement with a finance company will clear $3.5 million in debt for nearly 1,000 soldiers who bought computers and other electronics at highly inflated prices and credit terms at a SmartBuy outside the Army’s Fort Drum base, the state’s attorney general said Tuesday.

Rome Finance Co. Inc., of Concord, Calif., also agreed through its bankruptcy trustee to take steps to restore the credit histories of hundreds, Attorney General Eric Schneiderman said. Calls to Rome Finance’s trustee weren’t returned Tuesday.