During the Chinese cultural revolution, students assaulted their teachers. During the French liberation, Nazi collaborators were shaved in the streets. The perpetrators are often described as being in terror of holding back, afraid of being seen as sympathisers, panicky scapegoaters, desperately inciting the mob against others to reduce the threat to themselves.
Is there a phrase or idiom to describe that fear of incrimination by inaction, specifically in the context of (metaphorical) witch hunts?
The men, afraid of
[_____], shouted at the prisoners where the soldiers could see.
As noted by @BenjaminHarman: bonus points for conveying both the fear of being associated with a group and the fear of reprisal from another group.