The suspect accused of shooting six Philadelphia police officers Wednesday (Aug. 14) has finally surrendered and was taken into the custody of Philly police.

The Philadelphia shooting suspect, believed to be heavily armed with weapons including an AK-47, surrendered just before midnight following a seven-hour standoff.

After a member of the SWAT team shot tear gas into the home where the suspect was holed up in, the suspect walked out with his arms up and was quickly taken into police custody.

According to Philadelphia’s Fox 29 News, the incident unfolded around 4:30 p.m. Wednesday on the 3700 block of North 15th Street as officers were serving a warrant for drugs.

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

Around 9:45 p.m., two Philadelphia police officers and three civilians trapped inside the home with the suspected gunman were “safely evacuated” by a SWAT team. The suspect surrendered about two hours later.

“It’s nothing short of a miracle that we don’t have multiple officers killed today,” Philadelphia Police Commissioner Richard Ross said in a news conference Wednesday night.

The six officers who were shot were taken to area hospitals and have since been released.

A seventh police officer responding to the scene was injured in a car accident, and a pedestrian was also injured, police said.

Be the first to receive breaking news alerts and more stories like this by subscribing to our mailing list.