Republican gubernatorial candidate Ed Gillespie, right, gestures during his Oct. 9 debate with the Democratic challenger, then-Lt. Gov. Ralph Northam, at the University of Virginia-Wise in Wise, Va. Northam easily beat Gillespie on Nov. 7. (Steve Helber/AP)

Surveys of African American voters leading up to Virginia's elections found that Republican gubernatorial candidate Ed Gillespie had surprisingly strong support among black voters in October but that he lost their votes in the final weeks of the campaign, according to a coalition of minority advocacy groups.

Democrat Ralph Northam won partly on the strength of overwhelming support from African Americans, who made up about 20 percent of the Nov. 7 electorate. The surveys and analysis, released Thursday by the African American Research Collaborative in partnership with Latino Decisions, said Northam drew that support partly because of two factors: heavy get-out-the-vote efforts that reached more than half of black voters in some locations, and racially charged advertising from Gillespie that played particularly poorly with African Americans.

"The messages that [Gillespie] was driving home, apparently to try to energize a base vote, really very clearly backfired," said Henry Fernandez of Fernandez Advisors, a consulting group that coordinated the survey and analysis.

Gillespie had drawn criticism for ads that connected illegal immigration with the violent Latino street gang MS-13. He also aired spots late in the race that defended Confederate statues and heritage and that promised a harsh position on illegal immigration. The group's surveys showed that all those spots were viewed more negatively by black voters than by any other group — even worse than among Latinos, who were the subjects of the MS-13 ads.

The Republican campaign also made a late push to raise fears about Northam's support for the restoration of felony rights, the efforts of current Gov. Terry McAuliffe to restore voting rights to felons who have completed their sentences. Gillespie suggested that the actions would make it easier for violent felons to get access to guns.

The ex-felon population is disproportionately African American, and Fernandez said Gillespie's position came across extremely poorly to black voters.

"It again goes to this idea that the messages are around criminalization," Fernandez said. "We think this appears to have been a set of messages from Gillespie that made African Americans feel like he was saying that certain people, particularly people of color, are criminals."

What's more, Fernandez said the surveys showed that Northam's efforts to push back against Gillespie's positions did not appear to cost him support among white voters.

Coupled with extremely negative views that minorities have of President Trump, he said, the results offer a road map for Democrats for elections across the country next year.

"It was a real opportunity to try to understand what the dynamics might be in 2018 and gave us an opportunity to poll in an environment where you could tell a lot about the electorate in Virginia without a lot of other elections going on around the country that could start to create noise," Fernandez said.

Virginia general election guide

The survey, conducted Oct. 6-13, showed that 17 percent of likely African American voters planned to support Gillespie. At that level of support, the Republican probably would have won the overall election. No other publicly released surveys from that period showed black voters going for Gillespie at that level; a Washington Post-Schar School poll from October found Gillespie with about 9 percent support from African Americans, which is how the election actually played out. The AARC survey found that Gillespie's support among black voters had dropped to 8 percent three days before the election.

But the October survey conducted by Latino Decisions created a sense of urgency among some Democratic advocacy groups, leading to the Latino Victory Fund ad that depicted a white Gillespie supporter in a pickup truck, with a Confederate flag, chasing children of various ethnicities through the streets.

Northam never disavowed that ad, which ran for two days and drew outrage from Republicans. Fernandez said his groups' follow-up survey in November did not ask specifically about that ad, but that to the extent the contest was radicalized, Northam only benefited and Gillespie suffered.

The survey's questions were themselves politically charged. One question said that Gillespie "said that illegal immigrants are a dangerous threat to public safety, and that immigrants from Central America are violent gang members who rape and kill people in Virginia. Did these statements make you feel more enthusiastic about Gillespie or less enthusiastic about Gillespie?"

But the group emphasized that it was most notable that African Americans consistently responded more negatively to such topics than Latinos or Asian Americans. On that question, for instance, Latinos rated the Republican poorly by a margin of 45 percent; Asian Americans by a margin of 32 percent; whites by a margin of 23 percent; and African Americans by a margin of 73 percent.

In the November survey, 86 percent of black voters who had not heard about or seen the racially charged ads said they favored Northam, and 12 percent supported Gillespie. Among those who were aware of the ads, 89 percent favored Northam and 8 percent went for Gillespie.

Each of the two surveys reached roughly 1,600 to 1,700 Virginia voters, evenly distributed among white, African American, Latino and Asian American.