Mr. Dillard said it was time for the left to do some soul searching. “Take political parties out of it; that imagery and that behavior still exists today,” he said. “I do believe that there are probably still Democrats who have the same types of situations, same types of backgrounds as we discovered with Ralph Northam.”

As disappointed as many Virginians might have been in Mr. Northam, several said they were not surprised.

The first enslaved Africans brought to this country came through Virginia’s shores 400 years ago. The commonwealth passed Jim Crow era laws to prevent interracial marriage. Rather than following the Supreme Court’s order to send white and black children to the same schools in the 1950s, some counties in the state closed school doors. And just two years ago, white supremacists marched in Charlottesville to violently protest the removal of a Confederate statue.

Mr. Northam won 80 percent of the vote in predominantly black communities, according to Ms. Nguyen. While his call for the removal of Confederate monuments in the wake of Charlottesville might have deepened his minority support, the racist photo on his yearbook page showed that he was not immune to the state’s deeply rooted racism, several Virginians said.

“Down here, they’ll play with you a little while and then they’ll pull the trigger on you and let you know you are and will always be lower,” said Wendy Boyd-Sealy, who is black and has lived in Norfolk, where 42 percent of residents are African-American, since 2003.

Still, Ms. Boyd-Sealy, 59, said she believed that Mr. Northam should be given a second chance because people were too sensitive, that Mr. Northam should not be judged by that picture alone and that he was probably just a product of his environment.

Beverly McDonald, who owns the Norfolk branch of the soul food restaurant Croaker’s Spot, said she was torn. If Mr. Northam was currently advocating for black communities, the past might not be such a big deal, said Ms. McDonald, who is black.