A gunman opened fire outside a Northeast Philadelphia high school Monday afternoon, killing a 66-year-old passerby and leaving a 16-year-old student in critical condition, police said.

Minutes after Abraham Lincoln High School in Mayfair dismissed for the day, a fight among students broke out near the school, and several teenagers tried to run away, according to Police Commissioner Danielle Outlaw. A 21-year-old man fired at them and struck one of the students in the back of the head, she said.

A stray bullet flew into a passing car, hitting the 66-year-old driver in the head, Outlaw said. The vehicle then crashed off the side of the road. Police took the man, whom they did not identify, to Jefferson-Torresdale Hospital. He died less than two hours later.

The teenager was hospitalized in critical condition as of Monday evening.

The incident prompted worried parents to hurry their children from the scene, and it left Mayfair residents who live near the school shaken. The gunfire was another grim example of this year’s ongoing shootings crisis, and it was the second time in less than two weeks that a Philadelphia student was shot near his school.

Plainclothes officers who were stationed near the intersection of Rowland Avenue and Ryan Avenue witnessed the shooting and ran toward the gunman, who then dropped his weapon and got on the ground, Outlaw said. A handgun was still in the street as investigators processed the scene Monday afternoon.

Police also apprehended a second person who may have been involved, Outlaw said, but it was unclear if that person fired a weapon.

She said investigators were interviewing witnesses and had not yet determined what prompted the fight. She said investigators believe that the 21-year-old suspect has a younger brother who had been a Lincoln student and that there was an ongoing dispute between those responsible for the shooting and the teenagers who were fired at.

The high school is adjacent to Austin Meehan Middle School and Northeast Community Propel Academy, a district school for students in kindergarten through eighth grade. Classes were still in session when shots rang out, both Meehan and Propel were briefly under lockdown. A playground and day care are also across the street from the high school.

The shooting Monday came 10 days after 13-year-old Marcus Stokes was fatally shot in North Philadelphia at about 9 a.m. Officials said he was on his way to attend school at E.W. Rhodes Elementary when he was shot in the chest. The school was on lockdown for about an hour after the incident.

No one was arrested in connection with Stokes’ killing, and police have not determined a motive.

At Lincoln on Monday, School Superintendent William R. Hite Jr. said school officials would continue to work with police to make the corridors frequented by students as safe as possible. Hite said that while he was grateful officers intervened quickly, he’s “just devastated any time a student from the School District of Philadelphia is involved in a shooting, particularly on their way to and from school.”

“It’s tragic,” he said. “Young people should be able to go to and from school and feel safe.”

» READ MORE: Gunshots took a 13-year-old who was friends with everyone. At his North Philadelphia school, it’s ‘utter devastation.’

The man fatally shot Monday was the 439th person to be killed in Philadelphia this year, a 14% increase in homicides compared with this time last year, one of the deadliest years on record. The majority of those killings were committed with guns.

More than 1,700 people have been shot this year, and about 170 of them are under age 18, the highest year-to-date pace since at least 2015, police statistics show.

Sherry Guise, who lives near the corner where the shooting took place, said she heard the gunshots, then saw police detaining a suspect. The 55-year-old is a lifelong Mayfair resident and said there have long been fights among students outside Lincoln.

But she lamented that young people today seem to have easier access to weapons.

“Anywhere you go,” she said, “you have to look all around you.”

Staff writer Kristen A. Graham contributed to this article.