The campaign was overshadowed by a wave of shootings, including the assassination of a candidate.