A 10-year-old girl walking with her father on a hiking trail in Port Coquitlam, B.C. on Saturday was attacked by a black bear that witnesses say tried to drag her off into the woods.

The girl’s father and others successfully fought the bear off with rocks and sticks. She was rushed to hospital with critical injuries, according to a spokesperson for B.C. Ambulance Service.

“It didn’t want to let go,” one witness told CTV Vancouver. “It pulled her into the bush and was trying to pull her further and people were whacking its head, eventually it let go but tried to bite her again.”

The bear, which officials say was with its cub at the time, was later located by wildlife authorities and killed.

Conservation officers tranquilized the nearby bear cub and said the animals were likely drawn to the area by the smell of garbage. It’s unclear what happened to the cub.

The attack happened in Port Coquitlam’s River Springs neighbourhood.

With files from the Canadian Press