Henry Dominguez Vasquez, 20, and Juan Aguirre Zelaya, 18, have been charged in connection with the shooting death of 17-year-old Daniel Centeno-Miranda. An unnamed 17-year-old also is charged. (Photo by Loudoun County Sheriff’s Office/Photo by the Loudoun County Sheriff’s Office)

Three people have been charged in connection with the shooting death of a 17-year-old who fled poverty and violence in his native El Salvador only to be gunned down on his way to a school bus stop Friday morning in Loudoun County.

Danny Centeno-Miranda, who moved to Virginia to live with relatives in 2013, was about a mile from Park View High and just 50 yards from his bus stop when he was shot twice in the back. He later died at Inova Fairfax Hospital.

Saturday morning, after investigators worked through the night, the sheriff’s office announced they had arrested three male suspects from Sterling, Va., including a 17-year-old who is charged with second-degree murder and with using a firearm while committing a felony.

Investigators said they think the 17-year-old, whose name was not released because he is a minor, fired the shots that struck ­Centeno-Miranda. Commonwealth’s Attorney James Plowman said he intends to try the teen as an adult, but for now he is being held at a juvenile detention center.

Henry Dominguez Vasquez, 20, and Juan Aguirre Zelaya, 18, were also arrested and charged with being accessories to the shooting and with possession of a firearm while in the country illegally. Kraig Troxell, spokesman for the Loudoun County Sheriff’s Office, said authorities determined that the men were undocumented immigrants based on information the suspects gave them.

Daniel Centeno, 17, was fatally shot Friday in Sterling, Va. (Family photo)

All three are being held without bond and are to be arraigned Tuesday.

At a news conference Saturday, investigators offered few glimpses into what led to the violence, but they said the victim knew the suspected assailants from the neighborhood. Centeno-Miranda lived in the same complex of townhomes as Dominguez Vasquez and Aguirre Zelaya, who shared a unit on North Sterling Boulevard. The 17-year-old suspect may have attended Park View High at one point, said Richard Fiano, commander of the criminal investigations division.

“This was not a random incident,” Sheriff Mike Chapman said. “The suspects and the victim were known to each other.”

Chapman said investigators think the gunman approached Centeno-Miranda on foot and ran away after shooting him. He would not say how they believe the other two men are connected to the crime.

Chapman said law enforcement investigators were exploring the possibility that the shooting was gang-related and commended the work of the Northern Virginia Gang Task Force in helping apprehend the suspects.

“We’re looking into that there may be some gang affiliation, however we don’t know what the reason was just yet for the incident taking place,” Chapman said.

The shooting, which occurred before the morning bell at Park View, prompted school officials to put the campus on lockdown, meaning students were held in their first-period classes for the duration of the day.

Suzanne Devlin, head of safety and security for the school system, said officials are aware of gang activity in the school but urge students to leave affiliations and beefs with rival factions at the schoolhouse door.

“I don’t think that there’s any question that school likely has gang activity,” Devlin said. “What I’ve been told by kids themselves is ‘We understand the ramifications of assuming our ganghood in the schools.’ So they do what they can to leave it at the door.”

Michael Morris, 56, who lived next door to Dominguez Vasquez and Aguirre Zelaya, said police came to his door early Friday evening to ask about his neighbors and whether he suspected they were in gangs. He said they also went to the unit where Dominguez Vasquez and Aguirre Zelaya were staying and remained in the complex until early the next morning.

Morris said there was a rotating cast of occupants — mostly young men — moving in and out of the unit and that he never got to know any of them particularly well. They played soccer in the parking lot and occasionally crowded his front stoop but overall were respectful. When Morris said he smelled marijuana smoke wafting into his townhome, he went to his neighbors and asked them to quit smoking in the house. He said they were polite and obliged.

“We were never intimidated or felt fear,” Morris said. “They never bothered us.”

Just a couple of narrow streets over, Centeno-Miranda lived in an almost identical brick townhome with his aunt and uncle and other relatives. On Saturday, Porfirio Baires, his uncle, said they had little to say.

“Justice had to be done,” Baires said when asked about the arrests. He said Centeno-Miranda’s parents, who remain in El Salvador, sent him to the United States because they believed it would be safer. Now, they are “crying, sad.”