The suspect in Wednesday's hours-long standoff in Philadelphia surrendered to authorities just after midnight Thursday, exiting the residence with his hands in the air and with a police light shining on him, surrounded by a cloud of tear gas, reports Fox News.

The dramatic shootout in Philadelphia stretched on for hours as six officers were shot -- and two officers and three hostages were later freed, apparently unhurt. Philadelphia Police Commissioner Richard Ross said the incident began when two officers with the Narcotics Strike Force were serving a warrant at the multifamily home and the shooter opened fire.

Related: Multiple Officers Wounded, 1 Critical in North Philadelphia Shooting

The suspect was identified by unnamed police sources as Maurice Hill, 36, of Philadelphia.

All six wounded officers were in stable condition and treated for non-life-threatening injuries before doctors released them, Philadelphia police Sgt. Eric Gripp said.

Two other officers, including a police sergeant, were injured in an accident related to the emergency response and were being treated for non-life-threatening injuries.

"Fortunately, everybody is going to be OK," said Commissioner Ross, even as the shooter refused to surrender to officers during ongoing negotiations. He called the outcome "nothing short of a miracle that we don't have multiple officers killed today. We are so thankful for that."