When the U.S.-led invasion of Iraq bogged down amid a ferocious insurgency, bookstores on American military bases began selling out their stocks of a previously obscure 1964 book by David Galula, a French military theorist. “Counterinsurgency Warfare: Theory and Practice” drew on Galula’s experience in Algeria during that country’s ultimately successful bid for independence from France.

On June 23, an insurgency of a different kind won when British voters unexpectedly chose to leave the European Union, defying months of polling that suggested a narrow majority would opt to remain in the 28-nation organization. A gobsmacked British establishment still hasn’t settled on a course of action, leaving Britain mired in a political crisis of historic proportions.

Galula taught that professional soldiers needed to understand insurgencies on their own terms in order to defeat them, to learn techniques that staff colleges didn’t teach, and to apply them on unfamiliar terrain. In short, Galula wrote the book, still a biblical text for military theorists, on a species of what’s known as asymmetric warfare.

The strongest, if also the most volatile, insurgent force in American politics today is unquestionably Donald Trump, whose conquest of the Republican Party has flabbergasted its own establishment, and left Democrats wondering whether there is something afoot in the electorate that they don’t understand. And if there’s a candidate schooled in conventional political warfare, it’s his opponent, Hillary Clinton, who has methodically prepared her campaign for years.

In what will surely turn into a boon for academics and pollsters alike, a massive amount of research is now in full swing trying to make sense of the campaign over Brexit, as it’s now known, and the results of the referendum. It will be up to Clinton to apply the lessons of the British Brexit campaign in practice if she wants to defeat Trump.

Clinton is ahead in most polls right now, though the surveys in key states show much tighter margins. Here is a stab at how the Clinton campaign team might learn the lessons of Brexit, guided by the wisdom of Galula. Some are encouraging for Clinton, others more sobering:

 

Careful analysis will reveal the appeal of the unpredictable, be it Trump or Brexit.

Supporters of the European Union in Britain took comfort from polling that showed, until the very end, that a narrow majority of voters favored remaining part of the club, putting it well off the 52-48 victory for Brexit. According to a new study published by the London School of Economics and Politics, they should have worried more because online polling showed a much tighter race. “There was a lot of variation among the firms’ polling styles,” said Harold Clarke, a professor at the University of Texas at Dallas, and a co-author of the study. “But ultimately, the internet did better than the telephone polling.”

Trump himself has claimed that polling understates his support, leading to unexpected victories on Election Day. “People say, ‘I’m not going to say who I’m voting for,’” Trump said. “And then they get it, and I do much better. It’s like an amazing effect.” In truth, the data for “shy Trump voters,” who won’t tell pollsters the truth, is pretty thin. And online polls, where voters don’t have to interact with a human, seem to overplay Trump’s actual support on Election Day.

Rather than try to sort out these fundamental questions, autopsies of the Brexit vote took the results of 121 polls as their input, and adjusted the results statistically for the dynamics that they did understand, Clarke explained. Once researchers adjusted for that bias, they concluded that the pro-Brexit campaign was probably ahead most of the time. They could have figured that out well before June 23.

 

Don’t like anti-immigrant messages? Fair enough. But do understand them.

The most abhorrent moment in the campaign for EU supporters was when Nigel Farage, a leading EU critic, posed with a billboard showing refugees streaming into Europe and the caption: “Breaking point: The EU has failed us all.” It seemed to confirm that anti-EU voters embodied xenophobia, plain and simple.

Not so fast. Aalia Khan, of the Social Research Institute at the British polling firm Ipsos Mori, points out that immigration was the single biggest motivator of voters in the referendum — ahead of the economy or public services. Fully 72 percent of voters before the referendum said the number of immigrants coming to Britain would be a very important factor in their decision. Yet most voters said immigration had no direct impact on them.

The immigration issue may have been about something else: control. People who voted to leave the EU seemed to be searching for control over their lives from forces they perceived as menacing in the abstract. Fifty-five percent of those surveyed by Ipsos Mori said the government should have “total control” over who enters Britain, even if it means leaving the EU — and paying an economic price — for that power. That explains a lot about Trump voters who cite amorphous forces like immigration and trade as a top issues.

 

Underlying attitudes towards Europe and Clinton may prove decisive in turbulent times.

Supporters of the EU in Britain “needed to win votes from many people who held a very negative view of the EU,” according to Jane Green, a professor of political science at the University of Manchester. In a study before the referendum, only 16 percent of British voters saw themselves as “strong European,” while 61 percent saw themselves as strongly British. That proved a massive handicap for the pro-EU crowd.

This point may be the most salient one for Hillary Clinton, coming off yet another episode — this time about her private email server — that raised questions about her trustworthiness. Despite being arguably the most qualified person to run for president in recent history, Clinton’s support comes with a heavy sigh, according to new polling from the Pew Research Center. Among her own supporters, 48 percent say they are voting for their candidate; 50 percent say they are voting against Trump. “That is the highest share of a Democratic candidate’s supporters viewing their choice as more a vote ‘against’ the opposing candidate dating back to 2000,” Pew noted.

In the year of insurgencies, that may be as good as it gets for Hillary Clinton.