Antwon Rose II was “confused and afraid,” he wrote in a poem in 2016.

“I see mothers bury their sons,” it said. “I want my mom to never feel that pain.”

On Monday, two friends of Antwon, 17, a rising high school senior from Rankin, Pa., who was killed by an East Pittsburgh police officer last Tuesday, struggled to read that poem, “I Am Not What You Think!,” as family, schoolmates and friends gathered for Antwon’s funeral at his school, Woodland Hills Intermediate School, in Swissvale, Pa.

Antwon died after being shot three times as he ran from a vehicle during a traffic stop. The police said that he and another passenger fled after an officer stopped the Chevrolet Cruze they were in because it was thought to have been involved in an earlier shooting. The driver was taken into custody, interviewed and later released, the police have said.

A video that recorded the fatal shooting was widely viewed on the internet, and it has prompted days of protests over one more unarmed black teenager killed by a police officer.