With candles at their feet and the evening summer sun above, Amer Miller’s friends and family gathered at the community center near his home and linked hands.

“I want to read something that Amer wrote in my class that I think everybody needs to hear,” Miller’s senior English teacher, DeMarcus McMillan, told the crowd encircling him.

“ ‘How do we end gun violence?’ ” McMillan said, reciting from one of Miller’s essays. “ ‘We should do it shoulder by shoulder, arm in arm, marching forward. We should do it without violence but do it with peace to show our community and our nation that we are not going to take it anymore.’ ”

As they listened to some of the last words Miller wrote, the dozens that stretched around the basketball court at Wednesday’s vigil stood silent, still shocked that a teen passionate about ending gun violence and so driven to succeed in life could be fatally shot weeks after his high school graduation and days before his 18th birthday.

Miller was killed July 14 after a gunman robbed him of his iPhone X and fled, according to Prince George’s County police. Miller happened to encounter the gunman shortly after the robbery and asked for his phone back, police said. Instead, police said, the gunman fired.

Within hours of the shooting, police arrested 26-year-old Davion Ballinger of the District and charged him with first-degree murder in Miller’s slaying. Online court records did not list an attorney for Ballinger, but police charging documents said he denied that he was involved in the shooting.

Miller graduated from Fairmont Heights High School in May and had planned to attend Mount St. Mary’s University in Maryland on a track scholarship, his family said. He wanted to study law and run in the Olympics. His funeral is scheduled for Monday, a day after what would have been his 18th birthday.

April and Kareem Miller said their son played football, ran track, was in the theater and was “full of life and full of joy.”

“Everyone he reached out to, he inspired and encouraged them to go for their dreams, because that is what we encouraged him to do,” April Miller said. “It’s sad that we couldn’t see the second part of his life.”

She proudly remembers her son at a signing ceremony Fairmont Heights held for graduating seniors to announce where they were going to college. Miller stood onstage with a special message for the underclassmen: “Never let anyone take your dreams, because if God says it’s for you, then it’s for you.”

Clarke Perry, the senior class sponsor at Fairmont, said Miller had attended the high school for only a year after transferring from DuVal High in Lanham, Md., but fit in immediately. He became a class leader who was “always smiling, always laughing and always caring.”

“To have this happen to somebody who has so much potential is just a shocking thing,” Perry said. “He was a naturally good student. He was just taken away from us too soon.”

At Miller’s vigil, tearful mourners walked to the middle of the circle, angry that someone in their community focused on success was senselessly killed.

“He was the one who was going away to college to improve his education and his life, and someone took that away,” one of his former coaches said. “A grown man took away a child’s life.”

“It’s crazy how things go wrong!” one girl screamed in frustration. “We’ve got to keep our heads high! We shouldn’t be killing our brothers and sisters!”

“Protect each other,” one teacher said. “You can’t fall to the ground if you protect each other.”

Before the circle broke up, more teachers, coaches and students spoke, urging one another to heed the words from Miller’s essay on gun violence and lift the community.

Miller titled his essay “The Secret” and ended it by asking the reader, “So how do I feel about gun violence? How would I feel if I saw my fellow brother or my fellow sister laid out in the street?”

He would be filled with hurt, Miller wrote, but also empowered to make a difference with “love and peace.”