The U.S. Agriculture Department will pay 48,000 Georgia households a total of $22 million in a lawsuit settlement stemming from the state’s problems with providing food stamps.

The federal class-action lawsuit focused on longstanding problems with the state’s system of approving food stamp applications and paying people. The broken food stamp system caused tens of thousands of Georgians to lose their benefits or be blocked from applying.

The Agriculture Department pays for food stamps, but Georgia’s program is managed by the state Division of Family and Children Services.

The system introduced a centralized call-in system, which came fully online in 2013 after an 18-month phase-in. It quickly became a frustrating failure, keeping callers on hold for hours and leaving thousands of calls unanswered every month.

The federal government spotted the errors and threatened to cut upwards of $76 million in administrative funding unless the state’s social service agency fixed what had become a huge backlog of cases.

The state spent millions of dollars in overtime to bring down the backlog. In February of last year, the state Division of Family and Children Services announced it would scrap much of the call-in system, switching much of the work back to caseworkers in local DFCS offices.