It now seems likely that Hillary Clinton will get fewer votes than Barack Obama did in 2012. More distressingly for Democrats, she fared worse in Democratic-leaning cities that anchor swing states, including Detroit, Cleveland, and Milwaukee. To critics on the left, that’s evidence of a campaign that dragged its feet, and a candidate who took her base for granted. Her defeat, in their minds, was an unforced error.

But the numbers show something different. There’s no question Clinton faltered in some Democratic cities, but the gaps between her haul and Obama’s in those locations were modest. The vast majority of her deficit came instead from counties that Obama lost in 2012: They didn’t like him, but they really hated her.

As of Thursday, ballot counts collected by the Atlas of U.S. Presidential Elections show Clinton received fewer votes than Obama did in 87 percent of U.S. counties. That sounds worse than it really is. Some of those counties are pretty small, and the remaining 11 percent include a few megacities, such as Los Angeles and Chicago. Let’s put it another way: Accounting for population density, she scored worse than Obama in areas that are home to roughly half the people who voted this year, and scored the same or better than Obama with the other half.

Where did she fare the worst? Line them up, and it doesn’t look good—they’re a bevy of heavily Democratic counties.

Top Ten Counties Where Clinton Performed Worse Than Obama
County Primary city Obama 2012 Clinton 2016 Deficit
Wayne County, MI Detroit 595,846 519,444 -76,402
Cuyahoga County, OH Cleveland 447,273 398,271 -49,002
Milwaukee County, WI Milwaukee 332,438 288,986 -43,452
Erie County, NY Buffalo 237,356 197,686 -39,670
Sonoma County, CA Santa Rosa 153,942 116,027 -37,915
Macomb County, MI Detroit suburbs 208,016 176,317 -31,699
Honolulu County, HI Honolulu 204,349 175,696 -28,653
Suffolk County, NY Greater New York 304,079 276,953 -27,126
Genesee County, MI Flint 128,978 102,751 -26,227
Lucas County, OH Toledo 136,616 110,833 -25,783

With the exception of Macomb and Suffolk, Clinton still won all these counties. She just didn’t win them as decisively as Obama did. That hurt her: Counties, unlike most states, are not winner-take-all, and every vote counts toward the statewide total that determines who wins the electors. Clinton needed to run up the score in Democratic centers as high as she could to counter Trump’s overwhelming lead among rural voters. When she went to the liberal well, they didn’t give her the votes.

But they didn’t cost her the election, either. Among the 2,700 counties where Clinton got fewer votes than Obama did in 2012, she still held her own in most of the places her predecessor won, winning many of them and picking up 90 percent of his votes in the process. All told, she ended up with a 1.8 million vote deficit compared with Obama in these communities. That seems like a lot. But that wasn’t her big problem.

It’s in the regions Obama lost that Clinton felt the most pain. In red counties, she received only 84 percent of the president’s votes in 2012, finishing 2.1 million behind. Even if Clinton matched Obama in turnout for every county he won that year, that wouldn’t erase her deep disadvantage in conservative areas that the president himself couldn’t clinch.

Granted, things get a bit tricky in the swing states. In Wisconsin, Ohio, and Michigan, if Clinton had matched 2012’s turnout in Obama-friendly counties, she might have been able to pull out victories. But these states didn’t necessarily see Democrats stay home on Election Day. Rather, it seems likely that many Obama voters flipped to Trump.

And Clinton’s critics miss an important point: She actually performed better than Obama did in nearly 400 counties. Some of these places are quite hefty, population-wise. Here’s where she exceeded her predecessor the most:

Top 10 Counties Where Clinton Performed Better Than Obama
County Primary city Obama 2012 Clinton 2016 Surplus
Cook County, IL Chicago 1,488,537 1,611,869 +123,332
Harris County, TX Houston 587,044 706,471 +119,427
Los Angeles County, CA Los Angeles 2,216,903 2,329,231 +112,328
Maricopa County, AZ Phoenix 602,288 702,907 +100,619
Miami-Dade County, FL Miami 541,440 624,146 +82,706
Travis County, TX Austin 232,788 306,475 +73,687
Orange County, CA Anaheim 512,440 585,683 +73,243
San Diego County, CA San Diego 626,957 694,091 +67,134
Santa Clara County, CA San Jose 450,818 510,231 +59,413
Orange County, FL Orlando 273,665 329,894 +56,229

Clinton killed it in California (which still has 600,000 ballots left to count, many of which will probably go Democratic, given the state’s blue status). And she performed very well, compared with Obama, in many of the country’s major population centers. If you factor in these successes, Clinton’s net turnout actually tops Obama’s in the areas that went Democratic four years ago. In the end, she beat Obama’s take by 120,000 among those counties, with gains in the coasts canceling her popular-vote losses in the Rust Belt. That’s not a weak showing.

“Democrats did better this time in places that were already blue , and did worse in places that were already red,” said Barry Burden, a political-science professor at the University of Wisconsin, Madison. “It sort of is a battle of the many versus the few. You add up those smaller rural places, and they were enough to swamp the bigger urban areas, and even suburban counties.”

Unfortunately for Democrats, Clinton won in all the wrong places. Her strong showing in diverse, dense counties will have a place in history. But because of the Electoral College, her surpluses in California didn’t help her compensate for deficiencies in Michigan. And because she was so deeply unpopular in conservative communities, her net turnout will still fall below Obama’s. There’s also the insurgent popularity of Trump himself, who gained 1.5 million voters over Romney. Some of them were Democrats.

So Clinton won the popular vote, but she lost the election; she didn’t top her predecessor’s total, despite heavy turnout from places that liked him the most. Democrats will have to figure out how to capitalize on her successes—while at the same time avoiding her defeats—come 2020.