Of all the surprising things about the presidential race, few were as shocking as the exit poll‘s finding that Donald Trump lost to Hillary Clinton among Latino voters by a margin of only 65-29 percent, which was actually better than Mitt Romney did four years ago. How is that possible? After all, we’re at the end of a period in which Republicans competed among themselves to see who could be the most hostile to immigrants and promise the harshest crackdown. And then they nominated a presidential candidate who opened his campaign by calling Mexican immigrants rapists and criminals, promised to build a wall on our southern border and engaged in a nakedly racist attack against the Latino judge presiding over his fraud trial. How could nearly a third of Latinos have voted for him?

The answer is: They didn’t. On this point, the exit polls are just wrong.

That’s what Gary Segura and Matt Barreto, the political scientists who co-founded the polling firm Latino Decisions, tell me, and they have a strong case to make.

Before I proceed, let me note that Segura and Barreto did polling for the Clinton campaign, though that work was walled off from Latino Decisions (they separated themselves from the firm for the duration of the campaign). Their analysis of the problems in the exit polls when it comes to surveying Latinos comes from their prior research, and from LD’s comprehensive election eve poll, a survey with a sample size of 5,600, many more than the number of Latinos in the exit polls.

The first thing to note is that the LD poll showed Clinton winning Latinos by 79-18, which is not too far from what other polls showed in the days leading up to the election. So why should we believe that result is more accurate than the 65-29 figure in the exit polls?

The first reason is that the organization that conducts the exit polls, Edison Research, has always warned against using them for analysis of geographically clustered sub-populations such as African Americans and Latinos. That’s because exit polls are not a random sample of the country or even of the state in which they take place. Certain precincts are chosen and then interviews are conducted there, and those precincts are not chosen randomly. Evidence from prior years — which we have to rely on because Edison sometimes waits years before releasing full details of the exit poll’s methodology — suggests that they tend to skew more toward places with higher incomes and education levels, surveying relatively few of the kinds of places where Latinos are concentrated.

Since the exit polls may be looking more at closely contested precincts, “They’re going to be capturing African-Americans, Latinos, and Asians who live primarily among whites, because by definition, supermajority-minority neighborhoods aren’t competitive,” Segura says, leading to “a pretty consistent socioeconomic status bias.” He adds, “In this year’s data, according to the exit polls, 44 percent of non-white voters have a college degree,” while the actual number is more like 30 percent. The exit polls also show non-white voters with higher incomes than the actual population.

As Barreto points out, according to Census data, 48 percent of Latinos live in majority-Hispanic neighborhoods. About the exit poll, he says, “I guarantee that 48 percent of their completed [Latino] respondents do not live in majority Hispanic neighborhoods. It might be 15 percent.”

The second problem is language. Segura says that only a tiny number of exit poll interviews with Latinos are conducted in Spanish, as low as 4 to 7 percent. In contrast, in their surveys “we always aim for between 25 and 30 percent,” given how many Latino voters are foreign-born and are more comfortable in Spanish. Remove them from your sample, and you skew more Republican. In the LD election eve poll, Clinton led by 75-21 among those interviewed in English, but by 89-9 among those interviewed in Spanish.

So let’s say we accept that Trump got something much less than the 29 percent of the Latino vote the exit polls claim. How did he win? Latino Decisions concluded in a report they published in July of last year that if the Republican nominee couldn’t get more than 40 percent of the Latino vote, it would be almost impossible for him to win nationally, and other analysts with slightly different models came to the same conclusion. Where they wrong?

When I asked them this question, Barreto replied that their model was still mostly accurate, even if there were some things about the election it didn’t account for. First, their conclusions were based on what would be required for a Republican to get to 50 percent of the vote — and Donald Trump didn’t. According to the latest figures from David Wasserman, who is tracking the counting (votes are still being tallied, particularly in California), Trump has 47 percent of the vote and Clinton has 47.8 percent. Those numbers may change a bit, but if they hold, they mean that the third-party candidates got more than 5 percent of the vote this year; in 2012, they got less than 2 percent. Right now, Trump has a lower proportion of the vote than Mitt Romney got in 2012, and it’s likely to fall even further.

The second and related reason is that Trump was fortunate enough to add votes exactly where he needed them for an electoral college win. “In a very small handful of states, Trump did clearly mobilize enough rural and exurban white voters to improve over Romney’s turnout numbers,” Barreto notes, and that’s certainly true. Give Clinton 13,000 votes in Michigan, 27,000 in Wisconsin and 68,000 in Pennsylvania, and she’d be the winner and we’d all be talking about how brilliant she was.

Or look at Florida. Segura and Barreto point out that Clinton did significantly better in Florida counties with high concentrations of Latinos than President Obama did in 2012 — but it wasn’t enough to overcome the fact that Trump turned out voters in much higher numbers in the nearly all-white areas of the state than Romney did.

And what about Latino turnout nationally? “It looks like it was about 51 percent of eligible voters,” Barreto says. “The previous high was 2008 when it was exactly 50 percent of eligible voters.” And 2008 showed the highest overall turnout in decades.

I’ll put off a discussion about what this all means for future elections for another day, but let’s just say that the Trump administration isn’t wasting any time trying to further alienate the Latino electorate. For now, though, it looks as though Hillary Clinton, for whatever other ways she might have failed, accomplished what she needed to with the Latino electorate. It just wasn’t enough to give her the White House.