DETROIT — Residents who were wrongly accused of defrauding Michigan's unemployment program won a major ruling Friday as the state Supreme Court set a favorable deadline for people to sue over decisions spit out from a disastrous computer system and enforced by staff.

The court said victims qualify if they filed a lawsuit, or notice of a lawsuit, within six months of losing wages or tax refunds. The justices unanimously overturned an appeals court decision that had dashed the hopes of thousands of people with a different interpretation of the six-month window.

An automated computer system used by then-Gov. Rick Snyder's administration was a mess. People were accused of cheating to get jobless aid based solely on computers. They were forced to repay money, along with substantial penalties, and some were even forced into bankruptcy.

Although refunds and apologies were made, the state still is the target of lawsuits by people who said their due process rights were violated during the nerve-wracking saga. Attorney Jennifer Lord said 40,000 fraud determinations were ultimately overturned.

Attorneys representing Snyder's Unemployment Insurance Agency argued last fall that the six-month deadline to sue kicked in when the fraud notices were received. But the Supreme Court, in a 6-0 decision, said the clock started ticking later, when people saw their money getting seized.

"A plaintiff incurs no harm under the Due Process Clause until and unless he or she incurs a deprivation of property," Justice Stephen Markman said.

The case now will return to the appeals court where the unemployment agency can make other arguments to try to escape liability. It's unclear, however, if the agency will make those arguments. Michigan's new attorney general, Dana Nessel, represents the department and has expressed support for people who were wrongly accused of fraud.

A separate but similar lawsuit is pending in federal court.