A suspected gunman in the wounding of several police officers during a shootout in North Philadelphia was taken into custody roughly eight hours after the confrontation began, the Philadelphia Police Department announced just after midnight on Thursday. Department spokesman Sgt. Eric Gripp said at 12:08 a.m. EDT that the suspect had been apprehended and a SWAT team was clearing the residential building where the shootout occurred. Further details about the suspect were not released.

UPDATE: Suspect is in custody. SWAT is still clearing the house — Eric Gripp (@PPDEricGripp) August 15, 2019

Gripp had said earlier that six police officers were shot in the skirmish and treated at area hospitals. All six were later released. Al Kuchler, a legal representative of the Philadelphia Fraternal Order of Police, told HuffPost that one officer was hurt in a car accident. Other officers were taken to hospitals for injuries that were not gunshot wounds. Philadelphia Police Commissioner Richard Ross said Wednesday night that it was “nothing short of a miracle that we don’t have multiple officers killed today,” The Associated Press reported. Ross added that the confrontation, which had started after 4 p.m. Wednesday, had “gone from a hostage situation to a barricade.” At an earlier news conference, Ross said officers had been trying to coax the assailant “to come out peacefully, but he is refusing to do so.” Two police officers and “additional prisoners” who were trapped inside the house were safely evacuated by a SWAT team, Gripp said at about 10 p.m. No further information about the other prisoners was made available.

#BREAKING: The man accused of shooting six Philadelphia police officers and holding two others hostage has surrendered. Our camera caught him coming out of the home with hands up more than seven hours after it began. Latest: https://t.co/VusluhIx9spic.twitter.com/qg6f47Pp3h — NBC10 Philadelphia (@NBCPhiladelphia) August 15, 2019

In the midst of the standoff, Philadelphia Mayor Jim Kenney expressed anger at the amount of “weaponry” and “firepower” the gunman appeared to possess. “Our officers need help. They need help. They need help with gun control. They need help with keeping these weapons out of these people’s hands,” he told reporters.

“Our officers need help. They need help. They need help with gun control," said Philadelphia's Mayor during an hourslong standoff in the city that left 6 officers shot. https://t.co/vxtzmRYIIEpic.twitter.com/UZIpMtK3zY — CBS News (@CBSNews) August 15, 2019

The shooting broke out in the Nicetown-Tioga neighborhood of North Philadelphia, near Temple University. Helicopter footage of the scene showed a large police presence with many officers with their guns drawn. Police first arrived in response to a call about narcotics activity, Philadelphia police Capt. Sekou Kinebrew told CBS 3 Philly. Narcotics officers were attempting to serve an arrest warrant when the shooting started, The New York Times reported, citing the mayor’s office. The Philadelphia Inquirer confirmed that report. The Bureau of Alcohol, Tobacco, Firearms and Explosives later arrived at the scene to assist police.

Just arrived on scene right now @NBCPhiladelphiapic.twitter.com/yPc2TNEqpP — Aaron Baskerville (@ABaskerville10) August 14, 2019

Temple placed its Health Sciences Center Campus on lockdown, which was lifted shortly after 7 p.m. President Donald Trump was briefed on the shooting Wednesday night, according to a White House pool report. On Thursday, he commented on the shooting in a tweet:

The Philadelphia shooter should never have been allowed to be on the streets. He had a long and very dangerous criminal record. Looked like he was having a good time after his capture, and after wounding so many police. Long sentence - must get much tougher on street crime! — Donald J. Trump (@realDonaldTrump) August 15, 2019