What injury does partisan gerrymandering cause? Until last year’s Supreme Court decision in Gill v. Whitford, almost everybody would have given the same answer. Gerrymandering harms parties by costing them seats they would have won if the district lines hadn’t been manipulated.

In her impressive concurrence in Whitford, though, Justice Elena Kagan offered a necessary and expanded accounting of the damage it wreaks. In this view, the problem with gerrymandering isn’t just that it costs parties seats but also that it impedes their associational activities. As Kagan put it, “members of the disfavored party,” having been “deprived of their natural political strength by a partisan gerrymander,” may “face difficulties fundraising, registering voters, attracting volunteers, generating support from independents, and recruiting candidates to run for office.” All of these party functions are protected by the First Amendment because they involve the right of association. And all of them, according to Kagan, may be inhibited by gerrymandering.

Since Whitford, plaintiffs in several states have mounted associational challenges against district plans. They have introduced testimony that after the plans went into effect, fewer candidates from the victimized party ran for office, donors gave less money to that party’s candidates, voters became less supportive of the party, and so on. This evidence is certainly relevant, but on its own, it can’t prove causation. It can’t show, that is, that the litigants’ associational difficulties were due to gerrymandering—and not, say, to Trump’s election, a shift in public opinion, a strong economy, or any number of other factors.

To come closer to establishing a causal link, political scientist Chris Warshaw and I first assembled a data set of gerrymandering. We used several common measures of partisan advantage, all calculated for congressional and statehouse elections from 1972 to the present. We then quantified as many as we could of the associational activities that Kagan mentioned in Whitford. In sum, we found data on the seats that parties contest, the quality of parties’ candidates, the contributions these candidates receive, and voters’ partisan preferences. Lastly, we controlled for time- and state-related factors that might also influence the relationship between gerrymandering and party health.

Our findings should also be of interest to the Supreme Court as it prepares to hear two more gerrymandering cases next month.

In a nutshell, we found that Kagan was right. A party disadvantaged by gerrymandering fails to contest more districts. The candidates it does nominate have weaker credentials. Donors give less money to these candidates. And voters are less inclined to support them. Moreover, these effects are statistically significant at both the congressional and statehouse levels and hold no matter how gerrymandering is measured. The effects are substantively quite large too. A 1 standard deviation rise in gerrymandering, for example, is linked to about a 5 percentage point drop in the targeted party’s share of campaign contributions. It’s also tied to roughly a 9 point decline in relative candidate quality, as measured by incumbency or having previously won another office.

These results should be helpful to the plaintiffs currently pursuing associational claims around the country. To date, these litigants have relied on qualitative testimony from injured voters, candidates, and party officials. This evidence can now be complemented by our data-driven conclusion that, across many states and years, gerrymandering hinders parties in performing several key functions. Our study provides the methodological rigor that has been absent, so far, from the courtroom.

Our findings should also be of interest to the Supreme Court as it prepares to hear two more gerrymandering cases next month. The plaintiffs in Whitford didn’t allege associational burdens. The court thus left “for another day consideration of other possible theories of harm not presented here.” That day has now arrived. The litigants in the pending Maryland and North Carolina suits have raised associational claims. The lower courts in these cases have also ruled in favor of the claims, holding that the district maps are unconstitutional because they breach the First Amendment right of association.

This time around, then, the high court won’t be able to dodge Kagan’s associational account of gerrymandering. And when the justices confront this view, they should find that it’s correct. Gerrymandering does systematically undermine party health. And it does so not just in Maryland and North Carolina, and not just during the last decade—but, as our study shows, throughout the nation and over almost half a century.