Two Virginia police officers who worked for different agencies were fired this week after an anti-fascist group linked them to white nationalist organizations.

The first case involved Sgt. Robert A. Stamm of the Virginia Division of Capitol Police, who had been assigned to protests calling on Gov. Ralph Northam to resign over a racist yearbook photo that surfaced in February.

Anti-Fascists of the Seven Hills, which said it was based in Richmond, Va., wrote online in February that Sergeant Stamm came to its attention because he had a large Band-Aid covering his neck while patrolling. The group found photos on social media of Sergeant Stamm with tattoos, flags and banners that used white supremacist symbols and images, it said in a blog post.

It also said he was linked to the Asatru Folk Assembly, which the Southern Poverty Law Center has described as an extremist group that invokes pre-Christian Nordic spirituality. In 2015, the F.B.I. foiled a plot by men it described as followers of an extremist variant of the Asatru faith to attack black churches and synagogues in the Chesterfield area.