(CNN)Hillary Clinton's surprise loss in Michigan raises an urgent question for her campaign: What went wrong?
Michigan was supposed to be a clean victory for the former secretary of state, proving that she could win across the country and put her on a quick path to the Democratic nomination. But when polls closed and it became clear that the race against Bernie Sanders would be a nail-biter, the second-guessing among Clinton's allies kicked into full gear.
In the days ahead of the primary, Clinton repeatedly hammered Sanders over his 2009 vote against a bailout for the U.S. auto industry, calculating that the line of attack would resonate in a state that's home to the country's largest car manufacturers. But by Tuesday night, some Michigan Democrats aligned with Clinton's campaign said privately they think that strategy did not work as they intended.
CNN exit polls showed that Sanders outperformed Clinton among voters who are "very worried" about the U.S. economy, 56% to 40%. Among voters who believe international trade takes away American jobs, Sanders also led Clinton, 56% to 43% — a sign that Sanders' populist economic message resonated in Michigan.
In another troubling sign for the Clinton campaign, among voters who said their most important priority in a presidential candidate is that they are honest and trustworthy, Sanders overwhelmingly outperformed Clinton, 80% to 19%.
Some supporters pointed to the fact that, in contrast to Sanders, Clinton had only campaigned in Detroit, Flint and Grand Rapids. After campaigning tirelessly in Nevada and South Carolina, Clinton's schedule in Michigan seemed less packed.
The hand-wringing inside the Clinton circle also included the concern that perhaps the campaign had lost sight of winning the Democratic nomination — and started looking ahead at the general election too soon.
"They didn't take Sanders for granted as much as voters," said one top Democrat close to the campaign.
Clinton told supporters on Monday that "the sooner I could become your nominee, the more I could begin to turn my attention to the Republicans."
Clinton's aides seemed to anticipate the potential of a Michigan loss. A memo last week from Clinton campaign manager Robby Mook noted "even if Sen. Sanders were able to eke out a victory (in Michigan), we would still net more delegates in Mississippi, which holds its election on the same night."
Indeed, Clinton actually won more delegates than Sanders on Tuesday, according to a CNN estimate, picking up 84 to Sanders' 67. She now has 1,234 of the 2,383 delegates needed to win the nomination. That figure includes super delegates, party officials and office holders who have said they will back her.
Sanders has 567 delegates overall.
As it began to dawn on the Clinton campaign that the Michigan contest would be much tighter than it had anticipated, Jennifer Palmieri, Clinton's communication director, said that demographics were partly to blame.
"Michigan looks a lot like states that Sen. Sanders does well in. The Democratic vote is only about 75% white -- that is always coming in at a disadvantage to us," Palmieri told reporters Tuesday night in Ohio.
Palmieri added that at the end of the day, the campaign still felt "confident she is going to be the nominee."
Sanders' performance in Michigan gives the senator's campaign a fresh boost of optimism. Particularly after losing by big margins to Clinton in a state like South Carolina, where he had made aggressive outreach to the African-American community, one of his main challenges is to show that he can win over a more diverse electorate.
Clinton's struggles in Michigan will be particularly worrisome as the campaign aims to win neighboring Ohio on March 15.
But on Tuesday night, Palmieri denied that the tightness in Michigan indicates potential problems for Clinton in Ohio, arguing that Clinton's message on jobs, the auto bailout and the Republican Party can deliver them the Buckeye State.
"We think that she came into Michigan with a very strong economic agenda and message about how she would create jobs and put manufacturing sector around clean energy, also how she would help create small businesses, very future-oriented," Palmieri said. "We don't think Senator Sanders offered that and we think that that will be effective in Ohio."
Sanders acknowledged that the Michigan vote was close but thanked voters for "repudiating" polls that indicated Clinton had stronger support in the state.
"What tonight means is that the Bernie Sanders campaign, the people's revolution that we're talking about, the political revolution that we're talking about, is strong in every part of the country," Sanders said. "And, frankly, we believe our strongest areas are yet to happen."