After a shooting at the Rockville Metro station, police cordoned off an area near the station (Dan Morse/THE WASHINGTON POST)

Two people were shot just outside the Rockville Metro station Friday afternoon, after a gunman targeted one of the victims and shot a bystander in the process, police said.

Both victims received non-life-threatening injuries, and the shooter was apprehended within eight minutes outside a nearby gas station, police said. A second suspect connected to the shooting was later taken into custody, police said.

“This was not a stranger-based shooting,” said Maj. Tim Marsh of the Rockville Police Department. “They knew each other.”

The intended target is a 16-year-old male who was shot at least once in the leg, police said. The second victim, an 18-year-old female, was grazed by a bullet, said Officer Rebecca Innocenti, a spokeswoman for the Montgomery County Police Department.

Police said it was too early in the investigation to know what led to the shooting. Officers recovered a handgun they believe was used, Marsh said.

The Rockville Metro station is above ground. At 2:38 p.m., as commuters were coming down the small escalator from the platform, at least one gunshot was heard, authorities said. Someone called police, who found the 16-year-old victim at the exit to the pedestrian tunnel on the east side of the Metro station that takes commuters toward a parking area and downtown Rockville.

Officers were able to provide lookout information on their rad­ios as police converged on the scene, Marsh said. At 2:46 p.m., a suspect was picked up near a Shell gas station nearby, Marsh said.

One suspect has been arrested and the other one is in custody. Detectives were still questioning them, Marsh said.

As detectives worked the crime scene Friday, the eastern entrance of the pedestrian tunnel was closed, but commuters were able to get in and out through the western entrance. Metro trains continued running in both directions, police and Metro officials said.