A 28-year-old man is recovering in hospital after he was attacked by a dog while out walking his own pet in Saint James on Tuesday morning.

The man was walking his three-year-old mixed breed dog in Higgins Park at around 9am when the dog, believed to be a bull mastiff, jumped out of a car that had just pulled up next to a reserve.

Higgins Park. Credit:Hannah Barry

As the female owner of the dog exited the car, it's understood the mastiff began attacking the man's dog.

9 News Perth reporter Hannah Sinclair said the man quickly tried to break up the fight.