Officers gather for crowd control near a massive police presence set up outside a house as they investigate a shooting in Philadelphia, Wednesday, Aug. 14, 2019. (AP Photo/Matt Rourke)

Officers gather for crowd control near a massive police presence set up outside a house as they investigate a shooting in Philadelphia, Wednesday, Aug. 14, 2019. (AP Photo/Matt Rourke)

PHILADELPHIA (AP) — At least one gunman opened fire on police Wednesday as they were serving a drug warrant in Philadelphia, wounding six officers and triggering a standoff that extended into the night, authorities said.

Two other officers were trapped inside the house for about five hours after the shooting broke out but were freed by a SWAT team well after darkness fell on the residential neighborhood.

None of the officers sustained life-threatening injuries and they’ve been released from the hospital, Philadelphia police Sgt. Eric Gripp said.

“It’s nothing short of a miracle that we don’t have multiple officers killed today,” said Philadelphia Police Commissioner Richard Ross as officers continued their standoff with the gunman.

ADVERTISEMENT

The shooting began around 4:30 p.m. as officers went to a home in a north Philadelphia neighborhood of brick and stone rowhomes to serve a narcotics warrant in an operation “that went awry almost immediately,” Ross said.

“I was just coming off the train and I was walking upstairs and there were people running back downstairs who said that there was someone up there shooting cops,” said Abdul Rahman Muhammad, 21, an off-duty medic. “There was just a lot of screaming and chaos.”

Many officers “had to escape through windows and doors to get (away) from a barrage of bullets,” Ross said.

Shots were still being fired three hours later, police said, and officers returned fire.

Around 9:30 p.m., police said, a SWAT team freed the two officers who had been trapped inside, along with three people that officers took into custody before the shooting as part of the drug warrant. But the gunman remained barricaded.

Police were imploring him to surrender, at one point patching in his lawyer on the phone with him to try to persuade him to give up, Ross said.

“We’re doing everything within our power to get him to come out,” Ross said, adding: “He has the highest assurance he’s not going to be harmed when he comes out.”

Temple University locked down part of its campus, and several children and staff were trapped for some time in a nearby day care.

Police tried to push crowds of onlookers and residents back from the scene. In police radio broadcasts, officers could be heard calling for backup as reports of officers getting shot poured in.

Dozens of officers on foot lined the streets. Others were in cars and some on horses.

The Bureau of Alcohol, Tobacco, Firearms and Explosives said its agents responded to the scene to assist Philadelphia police.

ADVERTISEMENT

President Donald Trump and Attorney General William Barr were briefed on the shooting, officials said.

Philadelphia Mayor Jim Kenney said he was thankful that officers’ injuries weren’t life-threatening.

“I’m a little angry about someone having all that weaponry and all that firepower, but we’ll get to that another day,” Kenney said.

___

Associated Press writers Ron Todt in Philadelphia, Michael Balsamo in Washington, Caleb Jones in Honolulu and Michael Rubinkam in Allentown, Pennsylvania, contributed to this report.