As President Trump took the stage to champion the Second Amendment at a National Rifle Association convention on Friday, a United States senator sought to counter his message by unleashing a Twitter storm using the names, ages and pictures of gun violence victims.

Senator Christopher S. Murphy, Democrat of Connecticut, who has fought for increased gun control since the 2012 school massacre in his home state, posted on Twitter on Friday morning to urge his followers not to watch Mr. Trump’s speech and instead, “think about who we are fighting for.”