Even with the bevy of data collected on American workers every year, it can be difficult to nail down the exact causes of disparities in certain workers’ pay, let alone do something about them. Workplace protections such as anti-discrimination clauses and minimum wages have helped a little, but there are still big employment and earnings gaps between black and white Americans.

In a new paper from the National Bureau of Economic Research, the economists Celeste K. Carruthers and Marianne H. Wanamaker shed more light on today’s racial wage gap by turning to history: In their research, they look into the forces that determined the wages of Southern men during the 1940s, when segregation was legal and black workers weren’t protected by any anti-discrimination laws.

The big question that Carruthers and Wanamaker wanted to sort out was why the average black man and the average white man were earning different wages. Was it because employers were discriminating against black workers when determining pay? Or was it because black workers’ skill sets were relatively less valuable?

The answer they arrived at, after analyzing school quality, employment, and wages, was that differences in skills accounted for the most significant portion of the wage disparities in the 1940s. But the root of that skill gap was still racial. The explicit sanctioning of segregation by Jim Crow meant that black public schools lacked of resources and public funding—shortcomings that limited the skill sets and education levels of young, black men during this period, which in turn limited their job opportunities.

Carruthers and Wanamaker argue that a major determinant of public-school quality—and thus a school’s ability to churn out skilled workers—is funding. As the mid-20th-century South illustrates, a shortfall of money can hamper the development of entire groups of people: “The discriminatory preferences of white southerners were powerful in limiting black public-school quality and reducing the wages of young black men through the human capital channel,” the authors write. The persistent inequality of educational opportunities, they found, singlehandedly cut earnings of black Southern workers by as much as 50 percent.

Carruthers and Wanamaker’s findings are notable because they suggest that if black Americans were given equal educational opportunities, they could have had significantly better jobs and compensation, even during periods of systemic and intentional discrimination and disenfranchisement. “Education equality would have been a powerful tool for raising black economic standing in the South,” the authors write. Had schools not been kept separate, or had they actually lived up to the promise of educational equality, the authors hypothesize that the wage gap would be a lot narrower than it is today.

The development that, since the ‘40s, has had the most profound impact on starting to close wage gaps was the passage of the Civil Rights Act in 1964, which effectively ordered more funding for black children’s education by integrating both schools and neighborhoods. Twenty years earlier, in the era Carruthers and Wanamaker were focusing on, many black workers’ best bet was to move: Migration was an effective way for them to beef up their salaries and enter labor markets that were a better fit for their skills (not to mention find school districts that, while still separate, were perhaps not quite so unequal).

Of course, improvements to educational access haven’t been a cure-all. Median wages of black male workers during the fourth quarter of 2015 were only 72.4 percent of those of their white counterparts. And unemployment among black workers is around 8.8 percent, while for whites, it’s closer to 4 percent. And for workers lower down on the totem pole of skills, the gaps are even more troubling. As the Brookings Institution recently noted, nearly half of black male workers who haven’t graduated high school have disappeared from the labor force over the past 45 years, while the share of white male workers without a diploma has declined by less than 20 percent.

Today, many neighborhoods remain effectively segregated, and concentrated poverty means poorer areas don’t yield the taxes and investments to build up high-quality school districts. The result is a black populace that tends to earn lower wages, which keeps cycles of poverty going. School segregation is a major cause of labor inequality in the U.S.—whether it’s intentional or not.