(CNN) A suspect has been arrested after he barricaded himself for hours in a North Philadelphia home in a shooting standoff that left six officers wounded, police said.

"Suspect is in custody. SWAT is still clearing the house," Philadelphia Police Sgt. Eric Gripp tweeted early Thursday.

The shooting started at 4:30 p.m. Wednesday and was followed by a standoff that lasted nearly eight hours.

Two officers and three others who had been trapped inside the row house were evacuated by a SWAT team a few hours before the standoff ended, Philadelphia Police Commissioner Richard Ross Jr. told reporters.

"They were able to use stealth to do it," he said, adding he didn't think the shooter was aware of the rescue mission.

Read More