Note: An earlier version of this post appeared on December 12, 2017. This has been updated substantially to reflect changes in the political landscape.

When Roy Moore announced on June 20 that he would run again for the Senate in 2020, an array of Republican politicians responded with undisguised scorn. Senate Majority Leader Mitch McConnell (R-Ky.) promised that “we’ll be opposing Roy Moore vigorously” in the Alabama Republican primary. “He has no place as a candidate in our party,” agreed Sen. Mitt Romney (R-Utah), the 2012 Republican presidential nominee. Referring to the accusations of predatory sexual behavior and assault that preceded Moore’s narrow loss to Democrat Doug Jones in a December 2017 special election, Sen. Martha McSally (R-Ariz.) remarked that “this place has enough creepy old men.”

Moore must have expected that his candidacy would provoke such antipathy among his potential future colleagues. But he jumped into the race anyway, calculating that widespread opposition from top elected officials of his party would not prevent him from winning either the Republican nomination or a general election rematch against Jones next year.

Moore’s own experience gives him good reason to think so. Two years ago, Moore challenged appointed incumbent Luther Strange in the Republican primary and won by a 10-point margin — even though Strange benefited from endorsements and campaign appearances by many leading Republicans, including President Trump himself. Several Republican senators withdrew their support of Moore’s general election campaign after the allegations against him were made public in November 2017, while others (including McConnell) urged Moore to end his candidacy and even suggested that, if elected, he should be expelled from Congress. Yet Moore still received more than 48 percent of the popular vote in his race against Jones.

Why doesn’t the vehement condemnation of so many prominent Republican politicians necessarily kill off Moore’s electoral chances? The answer is that the distribution of power within the GOP has shifted, allowing a candidate to withstand strong opposition from the party’s traditional leaders.

Who really leads our political parties?

For many years, most political scientists followed the eminent V.O. Key Jr. in conceptualizing each party as a three-legged stool composed of voters, politicians and other government officials, and officers of the national, state and local party committees. More recently, however, many scholars have come to accept a different model of American politics in which elected officials, candidates, committee members and voters share control of the two major parties with a dense web of other individuals and groups that do not hold formal office but nevertheless play a central role in party affairs.

In this new view, Democrats and Republicans have each developed an “extended party network” that connects politicians and citizens to a wide variety of other powerful actors that include interest group organizations, financial donors, policy experts, strategists and consultants, and — especially for Republicans — media sources. Scholars of party networks argue that these other figures are sufficiently integrated into the organizations of each party that they should properly be considered components of the party itself — especially because they can sometimes pressure the titular “leaders” of their party to satisfy their demands.

During his last Senate campaign, Moore demonstrated that he sees popular conservative media figures as holding more sway over the electorate than Republican politicians do. When he drew criticism from leading Republican senators, Moore reacted with defiance, denouncing McConnell and his “cronies” for trying to “steal this election from the people of Alabama.”

But Moore responded very differently when Fox News Channel host Sean Hannity expressed concerns of his own. After Hannity called on Moore to “immediately and fully come up with a satisfactory explanation” for the accusations against him or “get out of this race,” the Moore campaign scrambled to satisfy Hannity’s demand. The next day, Moore released an open letter personally addressed to Hannity that sharply denied the allegations and said he was a victim of a “desperate attempt” by the “liberal media” to “smear my character and defeat my campaign.” That argument successfully satisfied the Fox host, who frequently argues that mainstream media sources are biased against conservatives.

Hannity has never held elective office, does not work in government and does not serve on a party committee. In fact, as of 2014, Hannity was not even registered as a Republican voter. But the sharp contrast between the deference Moore showed Hannity and his open contempt toward McConnell indicated that he would rather alienate his party’s top senator than a television personality who lacks any official position within the GOP. Treating Hannity as a party leader in his own right — and one with no small degree of influence over the Republican electorate — seems more appropriate than restricting our definition of the party organization to its formal apparatus alone.

Why don’t Republican voters listen to their party’s politicians?

As audiences for conservative media sources continue to grow, these outlets gain a wider hearing for their frequent complaints about the supposed ideological impurity and governing ineffectiveness of the Republican officeholding class. Their promotion of this view among Republican voters has in turn fueled support for outsider candidates who, like Moore, position themselves as principled enemies of the “Washington establishment.” When conventional politicians fight back, in part because they worry that some of these candidates will be weak nominees who will endanger the party’s chances of winning the general election, their opposition seems only to prove their critics’ point.

Most analysts regard the Alabama seat as an extremely promising takeover opportunity in 2020 that could well ensure continued Republican control of the Senate — unless a second Moore nomination allows Jones to once again transcend the state’s normally deep red hue. This assessment extends all the way to the White House. Trump has argued that “Roy Moore cannot win, and the consequences will be devastating.”

But Trump himself is the single greatest beneficiary of Republican citizens’ willingness to support an insurgent candidate who inspires little enthusiasm among traditional party leaders and whose personal controversies were thought to be major electoral disadvantages. As he attempts to defend his party’s Senate majority in 2020, Trump is now in the unfamiliar position of hoping that Republican voters suppress their rebellious instincts and, for once, dutifully defer to the wishes of Washington insiders.

David A. Hopkins is an associate professor of political science at Boston College whose latest book is “Red Fighting Blue: How Geography and Electoral Rules Polarize American Politics” (Cambridge University Press, 2017).