One of the more remarkable bits of recent political data, often unrecognized, is the extent to which the national electorate is growing more diverse — that is, the extent to which white voters make up less of those who turn out. Whites are still the overwhelming majority of voters, mind you, but by a smaller margin over time. In 2014, the percentage of the electorate that was nonwhite was as high as in 2008, the year that Barack Obama first won the presidency. In 2016, the percentage of nonwhite voters in the electorate was higher than it has ever been, according to data from the Census Bureau released on Wednesday — 26.7 percent. As a corollary, the percentage of white voters was at a new low of 73.3 percent.

So how did that electorate end up picking Donald Trump as president? Well, Trump lost the overall popular vote, of course. But there is a demographic shift buried in those numbers that helps explain why he won the states he needed to win.

There are hints in that top-line number. Michael McDonald of the U.S. Elections Project has a longer trend of the composition of the electorate, which corrects for a methodological tic in the Census Bureau numbers. What’s interesting to note about 2016 is that the drop in the density of the white vote was actually smaller than in years past.

Why? See if you can spot it in this chart, showing the change in turnout among groups from 2012 to 2016.

There’s a line that stands out: The drop in black turnout. Note that turnout among black voters was higher than among whites in 2012. That was true in both the 2008 and 2012 elections, both of which sent Obama to the White House.

If fewer black voters turn out, that affects the density of the nonwhite vote in the election. It also affects the election. If we compare turnout changes from 2012 with how demographic groups voted according to exit polling, the shift in black turnout stands out.

We’ll note here that white voters — both with and without college degrees — backed Trump over Clinton. That’s a long-standing trend.

Trump won the presidency thanks to 78,000 votes in Wisconsin, Michigan and Pennsylvania. While the density of the black population in Wisconsin wasn’t big enough for the bureau to measure turnout shifts, we can see how black turnout changed in the other two states.

With 708,000 registered black voters in Michigan and 750,000 in Pennsylvania (per the bureau’s data), 2 percent lower turnout means nearly 30,000 fewer voters heading to the polls in those two states. We’ll note that the margins of error here mean that the downward shift in those states may be smaller than indicated, but in a tight race, even a small decline is critical.

Other changes were more subtle. There was a slight uptick in the number of whites without college degrees who came to the polls — a core part of Trump’s base. Older voters turned out less heavily than in 2012, and younger voters turned out more heavily. In a race as close as 2016, any number of shifts in turnout could have played a significant role in the outcome.

The conventional wisdom has long been that a more diverse electorate tends to favor the Democrats. The results of 2016, though, show that we are at an inflection point where that correlation isn’t yet proven. (After all, Republicans also held the House and the Senate, despite that electorate.) The question for Republicans is whether they can count on continuing to win skin-of-the-teeth elections with less and less white electorates.

Scott Clement contributed to this report.