An elderly woman has been injured and her pet dog has died, after they were attacked by another dog in Penrith.

The 87-year-old woman had been walking her small maltese shih tzu-cross on Stafford Street in Penrith about 7pm on Sunday when her pet was attacked by a large American staffy that was unleashed, police said.

The woman tried to stop the attack but was knocked over and bitten on her hands and arm. She also suffered injuries to her head and hip.

The 46-year-old female owner of the staffy and a passing motorist were able to lock the dog in the owner's car.

They then helped the injured woman before ambulance crews arrived and took her to Nepean Hospital for treatment. It's understood her injuries are not critical.

The woman's dog died, and the staffy was taken to Hawkesbury Animal Shelter. A council spokesman said the dog would be euthanised.

Police are investigating the incident and have spoken to witnesses and the dog's owner.

The investigation is ongoing.