A shooting, which injured six policemen Wednesday afternoon in the US city of Philadelphia, ended early Thursday after the suspect surrendered himself.

Eric Gripp, a spokesman for the city’s police department, announced shortly after midnight that the suspect was in custody, after an eight-hour-long standoff with the police.

The suspect was identified as Maurice Hill, 36, who had a long criminal record of drug-related offenses.

Gripp said all the six injured officers had been discharged from the hospital.

Shooting erupted in the Nicetown-Tioga area of the city Wednesday afternoon after police entered a residence to serve a drug-related warrant but was met with gunfire. The police retreated and surrounded the building, trading shots with the suspect inside.

Two police officers were reportedly stranded inside the building during the standoff, and was later released after negotiations.

A female eye witness told local TV channel WPVI that gunshots were intense at times and at least 100 shots were heard.

The shooting disrupted life routine for many of the nearby residents, as the police cordoned off many blocks surrounding the site and prevented locals from entering.

By early August, the city of Philadelphia had registered six mass shootings, causing two deaths and 30 injuries.