A bear attacked a man after he allegedly kicked the animal while trying to protect his pet dog. The incident took place in Sierra Madre, California, on Monday afternoon.

Sierra Madre police reached the scene after receiving a report of a bear attack. The unnamed man, who was slashed and bitten by the animal, was rushed to a nearby hospital with non-life-threatening injuries while his dog too was taken to a veterinarian.

Speaking to CW-affiliated television station KTLA, Sierra Madre Police Chief Jim Hunt said a probe revealed the incident unfolded after the small dog went after a bear cub in a backyard. In order to protect the cub, the mama bear ran after the canine and attacked it. Soon, the dog’s owner reached the scene and kicked the mama bear in order to protect his pet. Police said the bear then slashed the pet owner on his calves before biting the back of his right knee.

Soon, the California Department of Fish and Wildlife officials reached the scene and tranquilized both the mama bear and her cub before loading them into a pickup truck and taking them away. Meanwhile, the man and his dog were expected to make a full recovery.

In a similar incident in April, an elderly homeless man was attacked by a bear as he slept in a popular hiking and recreation area near Sierra Madre in California. Police reached the area after receiving reports of an unknown man ringing doorbells. The responding police found the 84-year-old man bleeding profusely from his face and arms. He told the officers that he was attacked by a big brown bear while he was sleeping in the nearby canyon. The victim then managed to escape from the hill and hid behind a gate while waiting for the animal to go away.

A brown bear in the new enclosure 'La forêt des ours' at the Amneville Zoo in Amneville, eastern France, April 7, 2017. Getty Images/Jean Christophe Verhaegen