As the Great Recession was sending economic shockwaves through the country, it was also hurting student learning, according to a new study.

Using a huge data set that included over 95 percent of the country’s public school students, researchers from the University of Pennsylvania found that each year students spent in school during the recession hurt their reading and math test scores.

The effects were modest in size — roughly equal to the impact of increasing class sizes by three to five students — but they applied to a vast number of students.

Crucially, the downturn didn’t affect all students equally: Test scores generally declined the most in districts serving more disadvantaged students. More affluent districts, with many white students or few students with disabilities, for example, often went unharmed.

“The adverse effects of the recession were concentrated among school districts serving higher concentrations of low-income and minority students,” write researchers Matthew Steinberg and Kenneth Shores. “The Great Recession exacerbated the inequality of student achievement outcomes.”

Older students seem to have been affected the most, which is surprising in light of previous studies showing that young students are more susceptible to economic trauma.

The new research, which has not been formally peer reviewed, appears to be the first to examine how the economic downturn affected student learning.

To understand the cause and effect, the study compares changes in achievement among groups of students in districts most adversely affected by the recession to students in districts that were relatively unaffected by the downturn. They look specifically at the effects of being in school during the 2007-08 and 2008-09 school years.

The study cannot conclusively identify why the recession influenced learning. But achievement dropped more in schools that had to lay off a large number of staff and had their funding slashed — a finding consistent with a string of recent research showing that spending more on schools benefits students.

The research does not look at the post-Recession effects, when many districts and states made their deepest cuts to school spending.

Students may also have been been affected by changes outside of school, such as a parent losing their job. Past research has linked family income to student achievement.

The paper suggests the recession may have long-term economic consequences for affected students.

The study does not quantify the extent to which the federal stimulus cushioned the blow of the downturn on students. (Steinberg said this is the subject of planned follow-up research.) But it does note that the funding was not targeted at the districts that needed it most.

“The provision of federal fiscal stimulus was not based on where the recession was most severe or where the effects of the recession on student achievement were most pronounced,” the paper says, and, it argues, policymakers and school leaders should take note.