A 34-year-old Philadelphia police officer was wounded Friday afternoon in North Philadelphia after a bullet fired by his partner at a dog ricocheted into his left shin, according to police.

The officers had responded to a report of a dog attacking an 80-year-old woman inside a rowhouse in the 2900 block of Judson Street around 12:30 p.m. when the shooting took place, Police Commissioner Richard Ross said at a news conference at Temple University Hospital, where the officer and the woman were taken.

One of the officers fired his gun at the dog several times inside the house, and one of the bullets ricocheted, striking the second officer.

The injured officer, Kevin Fay, a four-year veteran of the force assigned to the 39th District, was treated and released. The name of the officer who fired the shot was not released.

The woman, whose identity was withheld, sustained extensive injuries to both legs from the dog, Ross said. She was listed in critical condition.

While officials said they were relieved that the officer's injuries were not more serious, they remained concerned about the condition of the woman.

"Her injuries are far more severe than that of the officer," Ross said.

The dog, a pit bull that police said belonged to a granddaughter of the woman who was bitten, was killed.

Douglas Stewart, 68, who lives directly across the street from the elderly victim in the Swampoodle section of North Philadelphia, witnessed some of the events leading up to the shooting.

"I was just coming out of the house, and I heard a dog barking and this woman hollering," Stewart said. "Then, I saw the man who lived in the home with the old lady, holding the door so the dog wouldn't get out of the house. The police arrived, and they also began holding the door so the dog wouldn't get out.

"That's when one of the police pulled out a pistol and shot the dog," Stewart said.

Afterward, several police cars combed the scene for evidence until about 4 p.m. Once they left the scene, there was blood visible on the steps of the home and on the sidewalk. Charred glass from the door was also on the steps.

Stewart described his 80-year-old neighbor as a quiet woman who mostly stayed indoors and kept to herself.

"I was really surprised to see this happen on this block," Stewart said. "It's normally a quiet block."

It was anything but earlier in the day, according to J.R. Smith, who lives two blocks away.

"I heard all the police sirens and saw a helicopter hovering above the block," said Smith, 51, who lives on the 3100 block of 25th Street, which runs parallel to Judson Street. "I actually thought it was a gang-related shooting because there were so many sirens. Everybody was just looking up at the helicopter and saying, 'Oh, someone else got shot.' "

Staff writer Emerson Max contributed to this article.