VANCOUVER -- A cougar was unintentionally caught in a trap near Williams Lake, B.C., earlier this week, wildlife officials say.

In a message posted on Twitter Tuesday, the B.C. Conservation Officer Service said the young female had gotten trapped the night before.

It was tranquilized, freed from the trap then taken a short distance away.

Conservation officers then stayed on site to ensure the cougar safely recovered. They watched it walk away, BCCOS said.

Cougars are the largest of the wild cats that live in Canada, and can grow to weigh more than 100 kilograms, WildsafeBC says.

They account for about 2,500 calls made to BCCOS each year, though the agency says many reported sightings turn out to be other animals.

Typically, cougars hunt deer, but they will eat young moose, elk and bighorn sheep, as well as small animals such as rabbits and squirrels.

Attacks are rare, but can be fatal. WildsafeBC advises anyone who encounters a cougar to remain calm.

"Make yourself look as large as possible and back away slowly, keeping the cougar in view, and allowing a clear exit for the cougar," a post on its website says.

Children and small pets should be picked up, but a person should not run, turn their back or make sudden movements.

"If you notice a cougar that is watching you, maintain eye contact with the cougar and speak to it in a loud firm voice. Reinforce the fact that you are a human and not an easy target. Back out of the area and seek assistance or shelter," WildsafeBC says.

If it shows aggression, keep eye contact and yell, but also pickup nearby sticks or rocks to be used as a weapon if needed.

To avoid running into a cougar, hike in pairs or groups. Make noise to avoid surprising any animals, and keep pets leashed or leave them at home.

Keep children within eyesight, and watch for signs including tracks, scratched trees, scat and food caches.

Encounters should be reported to the BCCOS at 1-877-952-7277.