A bear was freed after becoming trapped in a car.

El Dorado County Sheriff’s Office

A Northern California deputy fired several beanbag rounds into a back car window to free a trapped bear that had likely been searching for snacks.

El Dorado County Sheriff’s spokesman Anthony Prencipe said Thursday that officers were called after the bear was seen rummaging through a Honda Civic in South Lake Tahoe.

In a video, the caller says the bear did not seem very happy and that it looked huge.

The deputy says that he was going to try to break out the back window. After several shots, the window breaks open and the bear romps out and into the woods.

Prencipe said it’s safer to open a vehicle remotely than get close to a scared bear.

The sheriff’s office posted on Facebook that bears can open doors.