A 17-year-old Mergenthaler Vocational Technical High School student was shot and killed Friday afternoon as classes let out at the end of the first week of school in Baltimore, and law enforcement quickly apprehended the suspect, police reported.

The victim, Jeremiah Brogden, received CPR on school grounds from Baltimore City School Police and was then transferred to Johns Hopkins Hospital by ambulance, Baltimore Police Department spokesperson Nicole Monroe said Saturday evening. Medical personnel pronounced him dead at the hospital, Monroe said.

Brogden appeared to have been a member of the school’s varsity football squad, which had a 3:45 p.m. home game scheduled that day. He was listed on the team’s roster as a running back in his junior year.

In a tweet, the MERVO football account mourned his loss, calling it “senseless and unexplainable.” Coach Patrick Nixon, also the school’s athletic director, did not respond to a request for comment Saturday. .

Speaking during a Friday news conference, Police Commissioner Michael Harrison said the shooter was waiting outside in the yard, approached the student and pulled out and fired a gun during a heated encounter.

Baltimore City School Police, Harrison said, chased after the suspect, took him into custody and recovered a weapon that investigators believe was used in the killing. Officers could be seen photographing the gun inside a recycling container behind a home one block south of the school as sanitation workers emptied other containers in the same block.

Monroe said Saturday that the suspect, 17, has been formally charged with first degree murder and is being held without bail at a Maryland Department of Public Safety and Correctional Services facility.

The suspect went to a different high school in Baltimore, authorities have said.

“This is an extremely tragic situation — beyond tragic — happening on the grounds of a school in the beginning of the school year as school is opening,” Harrison said. “This is, again, another case of the prevalence of guns in our community, the ease of access to those guns and the willingness to use them just to solve conflict.”

Homicide detectives have assumed control of the investigation, Monroe said Saturday.

Mayor Brandon Scott was already set to be at the high school — he’s a 2002 alumnus of Mervo — to attend a football game that afternoon.

Scott offered his thoughts and prayers and lamented the loss of life. He urged the community to get involved and help young people.

”We have an entire community of children, of faculty, of staff, of this community, of a city, that is now seeing another young life lost. And it doesn’t have to be that way,” Scott said. “We don’t have to be that way. We can be better.”

City schools CEO Sonja Santelises said it was important for parents to know that the safety plan was in place and that school police officers were at their posts during dismissal. She praised school police officers for springing into action.

Santelises said counseling and grief support will be available throughout next week. She and Scott addressed students inside the school and told them, ”It is OK to be upset, it is OK to have to talk to people, because this is not normal for any of us.”

“My prayers, our prayers, will continue to be with the family and this community,” Santelises said.

In a tweet, Democratic nominee for governor of Maryland Wes Moore wrote that “our students should always be safe.”

“I’m saddened and outraged by the shooting outside of Mervo High School today. I’m praying for the family of the student who we tragically lost,” Moore said. “I’m closely monitoring the situation and grateful for the swift action of law enforcement.”

Last spring, two students were stabbed in the cafeteria on the same day that police discovered a loaded gun on school property.

Shortly after that happened, Santelises ordered all high schools in the district to begin using metal detectors. They’re still being used this year.

A teacher at Mervo, who did not want to be identified for fear of retribution, said he believes that he heard the pops outside when he was sitting in his classroom trying to get work done.

The first week of school, he said, had gone well. The teacher said the new principal, Tricia Lawrence, has done a great job so far and earned support.

He said he has never worried about his safety at the school. Faculty, he said, have taken the right steps to ensure safety.

“Now people will look at Mervo in a different way,” the teacher said.

Meanwhile. a man who would only identify himself as T. Johnson and as a 1988 graduate of the school, was there to attend the football game.

“When I went here you were afraid to get in a fight because they’d kick you out,” he said. ”It’s embarrassing, and it’s sad that this school has gotten to this point. No school should have this going on, but this one should have a different mindset.”

Shootings at Baltimore city schools are rare, with only a few happening in the past decade. There have been more shootings in recent years in suburban high schools in central Maryland.

Mervo is considered one of the better high schools in the city, after City College, Baltimore Polytechnic Institute and Western high schools, which all have entrance requirements.

In a separate incident, Baltimore County police were investigating the shooting death of a 14-year-old male Friday evening. At around 9:30 p.m., officers responding to the scene of a reported shooting near Liberty Road and Washington Avenue found two juvenile males with gunshot wounds, authorities said in a news release. One was pronounced dead at an area hospital; the other had a non-life-threatening injury.

Hallie Miller contributed to this report.