PHILADELPHIA — Both police officers wounded in a gunman’s shooting rampage that killed a woman and wounded several other people have been discharged from the hospital.

Sgt. Sylvia Young was welcomed by a line of dozens of uniformed police officers saluting her as she left Penn Presbyterian Hospital, her arm in a sling, and went to a vehicle that was then escorted by motorcycle officers.

Authorities said 25-year-old Nicholas Glenn ambushed the 19-year veteran as she sat in her patrol car in west Philadelphia on Friday night, wounding her in the left shoulder, arm and torso. Glenn then fired into a bar and into a car, killing 25-year-old Sara Salih, who was hit seven times, and wounded 56-year-old University of Pennsylvania police officer Ed Miller before he was shot and killed by other officers in an alley, police said.

Miller, released Sunday after treatment for gunshot wounds to his hip and ankle, told reporters at the Fraternal Order of Police’s Monday Night Football party that he was fine and was primarily concerned about the other victims.

“I guess I’m lucky. All I can think about is I’m very lucky,” he said.

Investigators said Glenn left a “rambling” note that expressed hatred for law enforcement and a probation officer. He fired at least 51 shots during the rampage and was armed with more ammunition, authorities said.