The fight began with an argument between two men, Ramsey said. One said he was going to call the police, and the other responded, "If you call the police, I'll shoot you and the police," Ramsey said.
When officers responded, the gunman shot Pawlowski multiple times, the commissioner said.
Police returned fire, wounding the gunman, who was in surgery and listed in critical condition late Friday, Ramsey said.
Police recovered a .357 Magnum from the scene.
Pawlowski, a 5 1/2-year veteran of the force whose wife was two months pregnant, is the city's sixth active duty officer to be killed in the line of duty in the last two years and the first killed in 2009.
"It's absolutely devastating to all of us," Ramsey said. "I've been in policing for 40 years and have never seen anything like this before."
Mayor Michael Nutter called Pawlowski a hero and said he was angry over the shooting of yet another city police officer.
"This is an incredible series of events that has happened too many times in this city over the last two years," Nutter said. "We're angry. We're upset and in a lot of pain. It is beyond words to try to explain what it is like when these incidents take place."
Officials said Pawlowski's brother was an officer who worked in the radio room, and his father is a retired officer.