It happened in the Harrison Plaza public housing facility on the 1100 block of West Stiles Street around 3:30 p.m. Monday.
Police say a group of men was standing there when they were approached by unknown individuals who opened fire.
Tyair Jabbar, 20, of the 6000 block of Trinity Street, was rushed to the hospital, but was pronounced dead at 3:48 p.m.
Ronald Fenwick, 32, of the 1100 block of Girard Avenue, was also taken to the hospital but was pronounced dead at 3:58 p.m.
Another victim, 27-year-old Marcello Robertson of the 3900 block of North 8th Street, was taken to the hospital with a gunshot wound to the chest. He was pronounced dead at 11:47 p.m.
The fourth victim, a 26-year-old man, suffered a gunshot wound to the stomach and is currently in stable condition.
Police say all four victims were friends, and all had lengthy criminal histories.
Officers arrived to find some 25 bullet casings on the ground near the victims. Police say the suspects fled in a small gray Dodge SUV.
"We only suspect that this is a rivalry between this group and some others several blocks away. It's unfortunate, because we anticipate that things like this will lead to retaliatory violence. And obviously we have to be prepared for that," Commissioner Richard Ross said on Tuesday.
The shooting happened across the street from St. Malachy Catholic School.
"There could have been kids out there. There could have been anybody around," Ross said.
The school was placed on lockdown as police investigated.
"We were in the school and all you hear were multiple gunshots. Then it got silent for a second. Then we hear we're on lockdown and nobody can get in or out," 12-year-old student Awtum Mintze said.
The incident happened in Council President Darrell Clarke's district; Clarke visited the crime scene Monday. He says the violence is getting out of hand, and blames too many illegal guns on the streets of Philadelphia.
"I think it's time to go to court again like we did before. Maybe we'll be successful with a new administration, a new regime in the attorney general's office, new mayor. We're prepared to do it again, something has to be done about this madness out here," Clarke said.
The commissioner said all the victims were known to police and a gun was found on one of them. They're looking for tips.
Send a breaking news alert to Action News
Report a correction or typo
Learn more about the 6abc family of apps