Philadelphia police on Friday were trying to identify a gunman who fatally shot a 17-year-old boy Wednesday in South Philadelphia while the nation’s attention was riveted on the shooting of six cops in Tioga.

Police identified the victim as Ammar Hassan of the 2900 block of North 12th Street in North Philadelphia. He was shot in the back of the head about 7:20 p.m. on the 2300 block of Bambrey Terrace and was pronounced dead shortly afterward at Penn Presbyterian Medical Center.

Hassan had arrived at that block in a tan or gray minivan with another man, Homicide Capt. Jason Smith said at a news conference Friday. They knocked on a door, then the other man left in the van, Smith said.

The van apparently returned to the block with at least two people, including the shooter, Smith said, adding that police did not know if the man who had been with Hassan was one of those who returned.

“That whole time, [Hassan] was outside pacing back and forth, appeared to be nervous,” Smith said. “These individuals showed up. They engaged him in a conversation. By all accounts, it appeared as if [Hassan] desired to leave the area, wanted to walk away.”

At some point during the 10- to 15-minute conversation, the assailant took out a gun and shot Hassan in the back of his head, said Smith.

Police recovered from the fatally wounded Hassan 31 packets of heroin and $320 in cash, at least some of it counterfeit, Smith said. He said police do not know the motive for the shooting.

The same night, police and city officials converged near the 3700 block of North 15th Street in Tioga, where a gunman barricaded himself inside a rowhouse after shooting and wounding six police officers, and two other officers and three other people were trapped on the second floor.

One South Philadelphia resident lamented that much less attention was paid to the fatal shooting on Bambrey Terrace. “The cops’ lives matter and these kids’ don’t. It’s not fair,” the woman said.

Asked about the woman’s remark, Smith said: “All lives matter to me, all lives are precious.” He said he had a “full team” of homicide detectives working on the Bambrey Terrace shooting Wednesday.

Police have made arrests in 53 percent of homicide cases so far this year, which rises to about 60 percent if cases with outstanding warrants are counted, Smith said.

Police did not have a detailed description of the Bambrey Terrace shooter, but Smith described him as a black male, 6 feet tall, medium build, with a “low haircut.”

They hoped to obtain surveillance video that would help lead to the gunman. Tipsters can contact 215-686-TIPS (8477) or email tips@phillypolice.com. A $20,000 city reward is offered for information leading to an arrest and conviction in a homicide.

Staff writer Helen Ubiñas contributed to this article.