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

One officer was shot in the head, but is “conscious and communicating,” police told The Philadelphia Inquirer. A second officer was hit in one or both arms, and the rest suffered unknown gunshot wounds. None of the officers’ injuries were considered life-threatening, police Sgt. Eric Gripp said.

A shooter remained active in the Nicetown neighborhood, Gripp tweeted.

Officers were negotiating with the gunman and imploring him to surrender, while urging people to stay away from the area, Gripp tweeted.

At least one suspect was in custody, police told a local NBC station.

Two officers trapped inside were freed, police said late Wednesday.

Live video from TV news stations showed a massive police presence, with dozens of squad cars and officers, many of them with guns drawn.

In interviews with other local TV channels, residents described a frightening scene punctuated by repeated volleys of gunfire.

“It was like a war — like a scene that you see in war,” a woman who lives in the neighborhood told NBC. “The guns, the fire, the noise — it was like bombs going off simultaneously at a time where people are having dinner.”

The Bureau of Alcohol, Tobacco, Firearms and Explosives said its agents responded to the scene to assist police. President Donald Trump and Attorney General William Barr were briefed on the shooting, a Justice Department spokeswoman said.

Washington Post contributed.