Across the pond, the Brexit disaster continues to unfold in newly disastrous ways. Theresa May has resigned as prime minister, and the Trump-esque Boris Johnson looks like a lock to replace her. Parliament members — up to and including Johnson's own fellow Conservatives — are panicking that the new prime minister may try hardline tactics to force Brexit through, plan or no plan.

At this point, predicting how this mess will end is a fool's errand. But there are still lessons to be learned from how it began.

In particular, the Conservatives might want to look in the mirror — and not just because it was their government that called the Brexit vote in the first place. It turns out the brutal austerity they imposed on Britain after the global 2008 financial crisis probably goes a long way towards explaining why Brexit is happening at all.

In the run-up to the Brexit referendum in 2016, much of the campaigning in favor of "Leave" was unabashedly racist. Hard-right political groups like the U.K. Independence Party (UKIP) painted a picture of native Britons overrun by hordes of foreign immigrants that were straining the country's health care, housing, public services, jobs and wages to the breaking point. The thing is, the racism was a particular poisonous way of framing a very real underlying economic fear: all those necessities really had become harder to come by.

Yet, as it is in America, actual evidence linking influxes of immigrants to rising scarcity in jobs and wages and other services is scarce. But something else had also recently happened that could explain why hospitals and schools were closing and why public aid was drying up: massive cuts to government spending.

A decade ago, the aftershocks of the global financial crisis had shrunk Britain's economy by almost 3 percent, kicking unemployment up from 5 percent to 8 percent by 2010. Under then-Prime Minister David Cameron, the Conservatives in power concluded that "confidence" among investors was necessary to restore economic growth — and that meant cuts to government spending to balance the budget.

Thus the Conservatives pushed through a ferocious austerity package: Overall government spending fell 16 percent per person. Schools, libraries, and hospitals closed; public services like garbage collection ground to a halt; poverty shot up; and homelessness doubled. Despite unemployment staying stubbornly high and GDP growth staying stubbornly low — in defiance of their own economic theory — the Conservatives crammed through even more reductions in 2012. "It is hard to overestimate how devastating Cameron's austerity plan was, or how fast it happened," the British journalist Laurie Penny observed. A United Nations report from last year called the cuts "punitive, mean-spirited, and often callous."

But the damage was not evenly distributed across the country. At the district level — Britain's units of local governance — the reductions in spending ranged from 6.2 percent to an astonishing 46.3 percent from 2010 to 2015. The districts that were already the poorest were generally the hardest hit.

These differences across districts allowed Thiemo Fetzer, an associate professor of economics at the University of Warwick, to gauge the correlation between the government cuts and whether a district voted Leave or Remain. "Austerity had sizable and timely effects, increasing support for UKIP across local, national, and European elections," Fetzer wrote in a recent paper. He found that UKIP's share of a district's vote jumped anywhere from 3.5 to 11.9 percentage points in correlation with austerity's local impact. "Given the tight link between UKIP vote shares and an area's support for Leave, simple back-of-the-envelope calculations suggest that Leave support in 2016 could have been easily at least 6 percentage points lower," Fetzer continued. As tight as the Brexit referendum was, that alone could have been enough to swing it.

Other studies have shown links between how a local British community's economic fortunes fared and how it voted for Brexit as well. Economists Italo Colantone and Piero Stanig found that support for Leave was "systematically higher" in the regions of the country hit hardest by trade with China over the last three decades. Another analysis by Torsten Bell showed a strong correlation between British income inequality as of 2015 and Brexit support, with higher local vote shares for Leave the lower the local incomes were. (It's worth noting the Bell didn't find a correlation with Brexit when he looked at how local incomes changed from 2002 to 2015, but that's also a weird time frame to choose, as it mashes together a period of wage growth before 2008 with a major drop afterwards.)

Inequality in Britain had been worsening for decades, as the upper class in the City of London pulled further and further ahead of the largely rural working class, setting the stage for Brexit. And then austerity fell hardest on the shoulders of the latter group, compounding the effect.

"Individuals tend to react to the general economic situation of their region, regardless of their specific condition," Colantone and Stanig wrote. But Fetzer was able to break out some individual data in his analysis of austerity, and he found a correlation with Brexit votes there as well. Individual Britons who were more exposed to welfare state cuts — in particular a reduction in supports for housing costs — were again more likely to vote for UKIP. "Further, they increasingly perceive that their vote does not make a difference, that they do 'not have a say in government policy' or that 'public officials do not care,'" Fetzer observed.

It isn't that the economic dislocation of the 2008 crisis and the ensuing austerity crunch made Britons more racist. By all accounts, half or more of the country has consistently looked askance on immigration going back decades. (Indeed, international polling suggests a certain baseline dislike for immigration is a near-universal human condition.) What changed in the last few years was the willingness of certain parts of British society to act politically on those attitudes. And that, arguably, is where the economics come in.

Work from the Harvard economist Benjamin Friedman is instructive here. He found that periods of economic growth, where people feel the future is bright, make national populations more open, generous, and liberal. Times of economic contraction and stagnation have the opposite effect.

The British people, like everyone everywhere, are a mix of good and evil impulses. But by decimating public investment in a self-destructive quest for investor-led growth, the British government created a monster from those impulses. And the reckoning for that terrible error is still unfolding.