PHILADELPHIA (CBS) — A Philadelphia police officer has been released from the hospital after being struck by a bullet that ricocheted when a fellow officer was trying to shoot a dog attacking an elderly woman.

The incident happened on the 2900 block of Judson Street in North Philadelphia.

Police Commissioner Richard Ross say officers were called after a dog attacked an 80-year-old woman inside her home.

“Nine-one-one received a call about a vicious dog attacking a female,” said Ross.

When one of the officers shot the dog, the bullet ricocheted, striking 34-year-old Officer Kevin Fay in the left shin.

Ross says the officer suffered a superficial wound.

“He had to shoot the dog at least once or twice to put the dog down and it’s one of those rounds that may have ricocheted and struck him,” said Ross.

Fay was discharged from Temple University Hospital late Friday afternoon.

The woman, however, suffered significant bite wounds to her legs and has been hospitalized.

“They did what they had to do to try to save this lady,” said Ross.

The officer who was struck is married and expecting a child.

The woman’s name has not been released.