(Erika P. Rodriguez for The Washington Post)

Donald Trump’s candidacy has divided the GOP, with a growing number of establishment Republicans refusing to go along for the ride.

How did this happen? Nearly everyone is trying to figure that out, with prominent explanations focused on the racial animus, economic anxieties and cultural alienation motivating Trump’s core supporters.

But a full accounting of Trump’s rise needs historical context. And it was a long-brewing conflict between establishment Republicans and party activists — eventually won by the activists — that laid the groundwork for the current foment within the GOP.

I became aware of this development in 2006, when I was doing elections research in several Rust Belt cities, the kinds of places Trump has identified as left behind by the American economy. Despite having won two presidential contests in a row, local Republicans were engaged in a war with themselves, a fight that was dividing members of the business community from a group of insurgent activists.

Shortly after the 2006 midterms, for instance, the Republican Party chairman in one city — a businessman and self-avowed moderate — resigned after claiming that “Christian Nazis” had taken over the party. Many in the city’s GOP establishment agreed.

“This guy, he called them religious Nazis. … He got that one right!” the heir of a large local business and formerly generous GOP donor told me. “The GOP has repositioned itself to a fault. [Those] of us in the middle don’t know what to do; [we’re] so disgusted.”

In each city I examined, relations between establishment Republicans and party activists were strained, devolving occasionally into open conflict. I met one activist in a downtown cafe popular with business people — in retrospect, a poor choice of a locale.

“I am definitely an activist,” she said, lowering her voice and leaning in. “But a lot of the people sitting in this room are just donors — [they] will never make phone calls and knock on doors. When you staff an office, you are going to staff it with activists, [who] will say, ‘Why should all the tickets [to political events] go to these Country Club Republicans?’”

Other academics have noticed similar rifts within the GOP. Historically, Republican Party leaders shared the political views of their community’s Republican voters, but in the 1970s, party leaders started growing more partisan, especially on hot-button issues. Most explanations of this trend focus on heightened controversy around abortion, guns or changes in party nominating procedures (the latter making it easier for activists to exercise control over their party’s agenda).

My research showed that the collapse of traditional business associations was a turning point in the party’s shift. To better appreciate this, consider what a grass-roots Republican Party looked like 40 years ago.

Factories, meatpacking plants and other large industries dominated urban economies. These companies’ owners joined business associations such as the Chamber of Commerce, which were central to civic and municipal initiatives and doubled — sometimes literally — as Republican Party headquarters. Although such business communities were especially developed in the industrialized Northeast and Midwest, scholars have identified similarly robust business associations in U.S. cities elsewhere.

The business establishment ran the GOP as a business party: against regulation, taxes and unions but mum on hot-button political issues. For instance, a 1976 survey of a Rotary Club in one city I examined found that 90 percent of Rotarians were committed Republicans, but most expressed ambivalence about abortion. Virtually none wanted it to become an important political issue.

Nothing resembling this kind of business establishment remains today. A key reason is the corporate mergers of the 1980s, during which outside corporations acquired local industries and liquidated them or managed them as subsidiaries. The local packing plant became a Tyson or Hormel plant; the former owner retired and quietly left town.

Those business leaders who remained adopted a new, community-focused approach that aimed at building partnerships with public officials and civic leaders, even Democrats, to encourage development in their cities. Those who excelled at this new imperative derided their predecessors’ political style. “The chamber … used to be terrible, total boys’ club, not big consensus builders,” a business leader who participated frequently in such partnerships told me. “ ‘I’m a Democrat and you are a Republican; I’m a conservative and you are a liberal.’ Unless everyone is working together, you can’t get anywhere anyway!”

As business leaders deepened their involvement in economic development, they withdrew from day-to-day GOP politics. It was this withdrawal that allowed successive waves of movement conservatives to wield increasing influence. First there were Christian conservatives, later libertarians, then tea party activists.

To be sure, conflict between Trump and mainstream Republicans is fueled by a variety of factors, including his appeals to racial prejudice. But this conflict is also the consequence of a long-term structural transformation of the GOP. The Republican Party of today has come under the increasing influence of ideological insurgents, a consequence of the withdrawal of local business leaders who once formed the core of the party.

Where the Republican Party will go from here likely depends on both the outcome of the November election and how the party responds to Trump’s victory or defeat. But reconstituting the GOP into a business-centric party once again may face significant obstacles. The traditional business leaders I encountered lamented their diminished capacities and inability to wield any civic influence, much less reassert control over the Republican Party. “Forty years ago, there were 50 people I could call on [to join a community initiative],” one told me. “Now, I don’t know who to call on.”

Josh Pacewicz is assistant professor of sociology and urban studies at Brown University. He is the author of “Partisans and Partners: The Politics of the Post-Keynesian Society,” which will be published in October.