Elections are now common in low-income societies. However, they are frequently flawed. We investigate a Nigerian election marred by violence. We designed and conducted a nationwide field experiment based on anti-violence campaigning. The campaign appealed to collective action through electoral participation, and worked through town meetings, popular theatres and door-to-door distribution of materials. We find that the campaign decreased violence perceptions and increased empowerment to counteract violence. We observe a rise in voter turnout and infer that the intimidation was dissociated from incumbents. These effects are accompanied by a reduction in the intensity of actual violence, as measured by journalists.