"Ironically, Korpalski and his partner had just passed by him in their wagon," he said, "so they turned right around."
The two cops found Ellis at Magee and Torresdale avenues, and soon were joined by two other officers.
Ross said Ellis fired at least one shot at the cops. Ellis was wounded several times and was pronounced dead at Aria Health Torresdale hospital at 1:25 a.m.
The .32-caliber handgun that Ellis allegedly used was found at the scene, Ross said.
According to court records, Ellis was sentenced to four to 10 years in prison in 2009 after being found guilty on charges that included drug possession, conspiracy and possessing a firearm. He was released on parole last year.
Korpalski was treated at Albert Einstein Medical Center and released. The 14-year police veteran was recuperating at home yesterday afternoon with his wife and infant daughter.
"He is so lucky," Ross said. "When you hear that a cop has been shot in the head, your worst fears run through your mind."
The deputy commissioner knows all too well what it's like to walk into a hospital in the middle of the night when a cop's life is in the hands of emergency-room doctors.
Seven Philadelphia police officers were killed in the line of duty between 2006 and 2009.
So Ross was relieved, he said, when he walked into Einstein early yesterday and encountered Korpalski, who works in Northeast Philly's 15th District.
"You walk in and he says, 'Hey, boss, how you doing?' " Ross said. "That was a good, good sign."
On Twitter: @dgambacorta