When more than 17 million British voters chose on June 23 to leave the European Union, it caused shock and consternation among political commentators on every major news channel — BBC, Sky, Fox, CNN. Many asked why the pollsters and markets got it wrong. Former U.S. treasury secretary and current-day pundit Larry Summers went so far in a June 24 Wonkblog post as to say that the term “political science” was an oxymoron.

Mr. Summers is wrong. The fault lay not with the discipline of political science, but with the embrace by so many media people and elites of the idea that “it’s (always) the economy, stupid.” The strong version of this claim holds that voters calculate their personal material self-interest and vote accordingly. Under this account, it’s no surprise that cosmopolitan Londoners chose to remain — they knew that leaving the E.U. would hurt their pocketbooks.

But what about those in the economically stagnant north of England — fearful of job competition from abroad, but sensitive to economic downturn and looking to benefit from E.U. financial assistance? Here, a weaker model of economic voting would expect the “Project Fear” messages from politicians and experts — which predicted economic calamity — to make people worried about potential economic losses and keep Britain in the E.U.

However, neither theory reflects a consensus among political scientists. A wide body of work in political science has in fact shown that the impact of economic self-interest on political attitudes and action — in domains ranging from tax policy and affirmative action to health care and immigration — is quite limited.

Why is this so? People may not be able to calculate the personal consequences of political policies or may be misled by confusing information and slogans. Even when they can actually figure out the costs and benefits, their calculations may be overwhelmed by the more powerful forces of deeply held identities and predispositions. Self-interest, defined as “what’s in it for me,” matters most when the stakes in a vote are large, visible and certain.

In the case of Brexit, many seemed not to believe the “remain” camp’s claim that Brexit would result in a loss of more than 4,000 pounds a year in the average person’s income. Public opinion research shows that the arguments of experts and leaders can be persuasive, but only for people who trust these experts or leaders.

An alternative analysis would start from group identities, arguing that the vote on Brexit can be framed in terms of how people think of “Us” and “Them.” Public opinion research provides clear guidance in this area.

Above all, the “remain” campaign faced the difficult challenge of justifying a set of European institutions to a nation that had historically held itself apart from the continent. Polling perennially depicts a British public more attached to its country than to Europe.

For example, the Eurobarometer poll asks people to say whether they identify only with their own nation; with their nation and then with Europe; or with Europe first and only then with their nation. As the figure below shows, in Europe as a whole, national identity swamps the emotional connection to Europe — by about 85 to 15 percent in 2010. In the U.K., the gap between a purely national attachment and self-definition as “just European” was more pronounced than in the rest of Europe. While Europe exists as a set of institutions, there are few people who feel themselves to be deeply European and united by a common “We” feeling. This matters when people are confronted with the potential loss of national culture and symbols.

Polling also shows resistance to strengthening the institutions that might one day foster pan-European identity. In 2008, the European Social Survey (ESS) asked people to use a scale of 0 to 10 to evaluate whether European unification had gone too far or not far enough. In 2008, before the recession and economic austerity, 48 percent of the collective European public felt that it had gone too far (4 and lower) with 26 percent feeling it had not gone far enough (6 and above).

The figure below offers a broader view of public sentiment, showing levels of trust in the E.U. parliament, trust in a country’s own parliament, and attitudes toward immigration. Britain’s mean score of 3.4 on a trust-in-E.U. measure scored from 0 to 10 was more Euroskeptical than elsewhere, but other countries were quite distrustful, too, all scoring below the 5.0 midpoint.

Although the figure below reports only on 2010 data, the ESS has shown for more than a decade that opposition to immigration is pervasive in Britain and the rest of Europe. In addition, the British Social Attitudes survey shows that the desire to reduce immigration grew from 2003 to 2011, with people viewing both the economic and cultural effects of immigrants more negatively. Finally, people who are against immigration are also quite likely to distrust government and have a strong sense of national identity.

This explains better than the journalistic cliches what actually drove Brexit voters. Post-Brexit interviews on CNN characterized the 17 million-plus “leave” voters as xenophobes, while liberal commentators such as E.J. Dionne have warned that Brexit raises the specter of burgeoning global ethno-nationalism.

How valid is such a characterization? For sure, nationalism is rising, and there is opposition to untrammeled immigration among British voters. However, it would be a leap to say that British identity is defined in ethnic rather than cultural or political terms. A comparative survey found Britons on balance to be unconcerned about religious conformity in their country and less concerned than Americans about the race or linguistic ability of immigrants. As a group, however, they believed that cultural homogeneity was a benefit.

In sum, research shows that “psychological fundamentals” suggest a British public sympathetic to the “leave” position. Furthermore, this isn’t likely to change soon.

Elites may complain that mass publics are misguided or intolerant, but their complaints are shortsighted. Identities are powerful. As Rupert Emerson wrote in 1964, the nation remains the largest community that enjoys legitimacy and commands people’s loyalty. This means that national identity is likely to be especially powerful. For the many individuals who are not political obsessives, to quote another political scientist: “Knowing who they are and are not — the cultures to which they do and do not belong — helps them to begin sorting their preferences.”

We should, of course, be humbler about forecasting. After all, England, the country that invented soccer, just lost to tiny Iceland. Yet our findings suggest that exit contagion — in which voters in other countries start pressing to leave the E.U. — is possible.

The next few years will provide, for better or worse, an experiment in how identity shapes politics and may even have the power to trump economic interests.

Jack Citrin is Heller Professor of Political Science at the University of California, Berkeley. John Hanley is an assistant professor of political science at Duquesne University. Morris Levy is an assistant professor of political science at the University of Southern California. Matthew Wright is an assistant professor of government in American University’s School of Public Affairs.