LITTLE ROCK — Mistakes by Hillary Clinton and a level of voter anger that pollsters and pundits underestimated led to Donald Trump’s upset win in last month’s presidential election, political analyst Charlie Cook said Tuesday.

The publisher of the Cook Political Report online newsletter and columnist for the National Journal magazine dissected the election in a talk to the Political Animals Club at the Governor’s Mansion in Little Rock. Cook, who was born in Louisiana to parents from Arkansas, admitted Trump’s win took him by surprise, as it did most analysts.

“I’m still speechless,” he said.

Cook said that in retrospect, it appears the Clinton campaign did not pay enough attention to the states where the race was closest: New Hampshire, Michigan, Wisconsin and Pennsylvania. Of the four, Clinton won only New Hampshire.

“This election basically came down to under 80,000 votes across three states,” Cook said.

Clinton never set foot in Wisconsin during the general election, making her the first major-party presidential nominee to skip campaigning in the state since 1972, he said.

In the last month of the race, Clinton ran more advertising in Omaha, Neb., than in Michigan and Wisconsin combined, Cook said. He said said that was an example of her campaign paying too much attention to states she was unlikely to win — Trump won Nebraska — and not enough to states where the race was close.

“I think that at the end of the day, basically they were going for a big win. They were going for Arizona. They were flirting with Georgia,” he said. “I think there was a desire to run up the score, and in doing that they stretched themselves too thin.”

Cook said Clinton also showed her overconfidence in the final months of the campaign by making fewer total appearances than Trump and taking time off in August.

“This was a case of campaign malpractice,” he said.

Clinton’s overconfidence was fueled by polls that showed her ahead in Michigan, Wisconsin and Pennsylvania despite her eventual loss in each, Cook said. The poll numbers also may have dampened Democratic voter turnout because they made voting for Clinton appear less urgent to her supporters than it was, he said.

Cook noted that Clinton has blamed her loss on FBI Director James Comey’s statement days before election day that the agency had discovered new emails possibly related to its previous investigation of Clinton’s use of a private email server when she was secretary of state. But Cook said Clinton deserves a share of the blame for that development.

“I know I’m going to sound like an Old Testament type, but I kind of go back to the original sin, that is, the decision to do the private emails. If it wasn’t for that, the FBI would have had nothing to do with any of this,” he said.

Also contributing to Trump’s win was the success he had in putting forth a message that resonated with discontented voters, such as his threats to punish companies that shut down plants in the U.S., Cook said.

“In this country, there have been no political costs to shut down plants in the U.S.,” he said. “We’ve sort of tried Plan A, which is offering carrots, but when was the last time we saw anybody wave a stick?”

Cook said Trump appealed to voters who are angry and frustrated with the current system — so much so that electing a wild card like Trump seemed worth the risk.

The outcome of the race also was affected by the presence of Green Party candidate Jill Stein and Libertarian Gary Johnson, Cook said.

“I think the Libertarians that Gary Johnson was drawing, I think they came from both sides, but the Greens, I think they kind of came from one side,” he said.

Looking at the bigger picture, Cook said the Democratic Party has focused so much on urban areas and the coasts that it is at a disadvantage in middle America. He said the party cannot fix that problem quickly and said it is more likely to lose seats in Congress in 2018 than gain any.

“The last few years, Democrats have sort of ignored that small-town rural America even exists anymore,” he said.