Deputies with the Washoe County Sheriff's Office recently freed a bear that got trapped inside a vehicle near Lake Tahoe, California.

Police were called to a residence in South Lake Tahoe after a call came in about a bear stuck inside a car, officials said in a May 28 social media post. 

The responding Incline Patrol deputies put their heads together and came up with a plan to safely free the bear.

Video shows a deputy tying yellow rope to the handle on the backseat door of the vehicle and then backing away to a safe distance. Hiding behind a tree, the deputy pulls on the rope to open the door, and out jumps a big brown bear.

GREAT WHITE SHARK BARES TEETH TO CHOMP BAIT UP CLOSE AND PERSONAL WITH VIDEOGRAPHER

A yellow rope is tied to the car door handle

A Washoe County Sheriff's deputy ties a rope to a car door to safely open it and release the trapped bear inside. (Washoe County Sheriff's Office)

A brown bear runs away after it is released from a car

The released brown bear hops out of the car. (Washoe County Sheriff's Office)

The freed bear runs off into the woods, video shows. Photos at the end of the video show the vehicle interior, which was heavily damaged by the obviously irate bear who wanted to get out.

"Spring is an active time for our Tahoe bear population and a good reminder to be bear-aware when enjoying the beautiful outdoors," officials said.

The Washoe County Sheriff's Office shared some tips to help prevent "unwelcome bear visits."

"Be mindful of food wrappers, coolers, and scented items in vehicles. Avoid leaving food in cars. Don't leave garbage outside and dispose of trash inside (not next to) bear-proof designated receptacles," the sheriff's office said.

Above all, "Do not feed the bears!"

HAWAII MAN PLEADS GUILTY TO PICKING UP YELLOWSTONE BISON CALF, RESULTING IN ITS HERD REJECTION, EUTHANASIA

The brown bear runs off into the woods.

The brown bear was filmed running away after deputies released it from the car where it was trapped. (Washoe County Sheriff's Office)

Bear attacks are rare in the U.S., but victims have suffered serious injury and death. The National Park Service has guidelines for bear encounters that may lessen the threat of danger.

"Your safety can depend on your ability to calm the bear," the National Park Service's website states. "If a bear happens to surprise you, stay calm. Do not surprise the bear if it’s unaware of your presence."

The guidelines recommend keeping your distance from a bear and taking pains to avoid surprising the animal. There are several strategies to follow if it does notice and starts paying attention to you.

If faced with a bear, stay calm. Talk in low tones and gently wave your arms, so the bear recognizes you as a human and not as prey. Do not scream or make any sudden movements. If there are small children with you, pick them up immediately and keep them from screaming or making high-pitched noises the bear could misidentify as the sound of a prey animal.

YELLOWSTONE NATIONAL PARK VISITOR IS SEEN TAKING SELFIE INCHES FROM BISON IN VIDEO

The damaged car interior

The interior of the car was severely damaged by the trapped bear. (Washoe County Sheriff's Office)

Hike and travel in large groups to make bears aware of your scent – they'll avoid you. Large groups are also intimidating to bears. If you are alone, make yourself look as big as possible, possibly by moving to higher ground.

Do not climb trees, bears can climb trees. Do not run else the bear will want to chase you like a dog. Stand your ground, and if the bear is stationary, move away slowly and sideways, which will appear non-threatening.

CLICK HERE TO GET THE FOX NEWS APP

Importantly, never interfere with a mother and her cubs. If a mother bear thinks you are a danger to her cubs, the chances of an attack escalate greatly.