A Vancouver Island teenager may have been saved from a potentially deadly cougar attack because of quick thinking – and standing up straight.

The 18-year-old girl was riding her bike near an elementary school in Nanaimo on Monday evening when the animal started stalking her, circling her and crouching low to the ground.

Police say the young woman immediately got off her bike and stood her ground while she confronted the cougar. The animal quickly ran off into the bushes.

Conservation Officer Steve Ackles said she did the right thing by making loud noises and appearing as tall as possible.

"Never turn and run when a cougar is coming at you low to the ground as the cougar may strike," he said.

Nanaimo RCMP said while there have been cougar sightings in the area in the past, this is the first one of the year.

Cougars are known to frequent rural or semi-rural areas around B.C., especially when food supply in the wild dwindles.

Mounties in the Victoria suburbs of Sidney and North Saanich issued a cougar advisory on Tuesday, warning of two big-cat sightings in Horth Hill Regional Park in the month of June. Police are asking neighbours and users of the park to keep a close eye on their children and avoid travelling on their own.

Officials in Maple Ridge, east of Vancouver, sent out a similar public warning earlier this year after one animal killed seven livestock – including a miniature horse – in one week.

The B.C. Conservation Service told local residents not to let their pets or children outside between dusk and dawn because this is the time when the animals are most likely to hunt.