A man surrendered early Thursday after a tense, hourslong standoff with the police in Philadelphia, the authorities said, but only after he unleashed a “barrage of bullets” that wounded six officers and terrified residents.

The standoff began when officers tried to serve a narcotics warrant and ended more than seven hours later with the suspect emerging from a house with his arms held over his head. In the hours preceding his surrender, he spoke on the phone with his lawyer, the police commissioner and the district attorney, at one point speaking with all three men at once.

Here is what we know about the suspect, the standoff and the wounded officers.

A suspect was taken into custody and identified.

In a Twitter post at 12:08 a.m. Thursday, Sgt. Eric Gripp of the Philadelphia Police Department said that the suspect was in custody and that SWAT team members were clearing the house.

The city’s police commissioner identified the suspect as Maurice Hill, 36, who has an extensive criminal history.