Extending unemployment insurance during the recession didn’t just give the unemployed some extra income, but actually prevented millions from being foreclosed on, according to a new study from Joanne W. Hsu, David A. Matsa, and Brian T. Melzer.

Given that different states have different amounts they’ll pay out in unemployment benefits — in 2011 it ranged from $6,000 in Mississippi to $28,000 in Massachusetts — the researchers looked at what impact more generous benefits had on mortgage delinquency. They found that for every $1,000 extra in maximum benefits, the likelihood that an unemployed worker’s mortgage would go into delinquency declines by 25 basis points. Getting benefits for a longer period has a similar effect, as each additional week decreases the chance of delinquency by 34 basis points. “Based on this variety of tests, we conclude that the estimated effect of UI generosity is causal,” they write, meaning that bigger checks reduce the chances of going into delinquency directly.

They also found that the effect isn’t just a temporary forestalling of an inevitable foreclosure, but that it has a lasting impact on keeping people in their homes. “The effect seems to be long term,” they write, “as UI [unemployment insurance] benefits not only mitigate loan delinquency, but also reduce homeowner relocations and evictions.” Each additional $1,000 in benefits reduces the chance of an unemployed person’s mortgage going into default by 2.4 to 11 basis points. “We find that UI helps not only to postpone delinquency but also to keep laid off homeowners in their homes,” they conclude.