Firearms are the leading cause of death for children in the US. It is therefore crucial to identify effective ways to reduce firearm injuries among children. To test the effectiveness of a gun safety video vs a car safety video on decreasing unsafe behaviors around real guns after exposure to a violent movie with vs without guns. Of 245 participants aged 8 to 12 years, 226 were tested (13 did not complete the laboratory portion, 4 had technical problems, and 2 did not respond to follow-up inquiries). Data were collected from February 2 to October 16, 2022. Participants were recruited via Facebook ads, ResearchMatch, and parent or guardian referrals. The study was conducted in 2 parts. Children watched a safety video at home 1 week before coming to the laboratory at The Ohio State University. Pairs of children were randomly assigned to watch a 1-minute gun or car safety video at home. In the laboratory, they were randomly assigned to watch a 20-minute clip from a violent PG-rated movie with or without guns. Next, they played with games and toys for 20 minutes in another room that contained 2 disabled 9-mm handguns hidden in a file cabinet drawer. Sessions were videotaped via a hidden camera. Outcomes were whether children told an adult, touched a handgun, handled it, or pulled the trigger. Control variables were age, gender, race and ethnicity, trait aggressiveness, age-inappropriate media exposure, firearm attitude and interest, presence of firearms at home, and whether children had taken a firearm safety course. Of 226 children (mean [SD] age, 9.99 [1.38] years; 113 [52.3%] male), 216 (95.6%) found a gun and were included in analyses. Those who saw the gun (vs car) safety video were more likely to tell an adult about the gun they found (38 of 112 [33.9%] vs 11 of 104 [10.6%]), were less likely to touch the gun (44 of 112 [39.3%] vs 70 of 104 [67.3%]), held the gun fewer seconds if they did touch it (mean [SD], 42.04 [121.46] vs 98.96 [195.10]), were less likely to pull the trigger at all (10 of 112 [8.9%] vs 31 of 104 [29.8%]), and pulled the trigger fewer times (mean [SD], 4.20 [20.17] vs 7.23 [15.75]). Being male, exposure to age-inappropriate movies, and gun interest were related to unsafe behavior. Prior completion of a firearm safety course, having guns at home, and negative gun attitudes were related to safe behavior. In this trial of children assigned to watch a gun or car safety video, watching a gun safety video reduced children's unsafe behavior around real guns. Children who had previously taken a gun safety course, had guns in the home, and had negative attitudes toward guns were less likely to engage in unsafe behavior around real guns. To encourage safe firearm behavior, children should be educated about gun safety and should not watch age-inappropriate media. ClinicalTrials.gov Identifier: NCT05257837.