Everyone does silly things when they’re “hangry,” particularly when you’re a bear without a spare set of car keys.

The Boulder County Sheriff’s Office reminded residents of this fact Tuesday after responding to an unusual vehicle trespassing case: a bear broke into a car and locked himself inside.

Deputies were able to successfully let the bear out of the car without anyone, including the bear, being harmed.

“This is a good reminder that wildlife is out and about this time of year looking for food,” the sheriff’s office said in a Facebook post. “Trust us, you don’t want to have to deal with a ‘hangry’ bear.”

While the officers who responded to the overnight incident were all getting some deserved rest Tuesday morning, Boulder County Sheriff’s Office spokeswoman Carrie Haverfield said she could confidently assume the car was in bad shape after the bear break-in.

“I’ve never heard of a good ending for the car or property with this kind of thing,” Haverfield said.

The sheriff’s office provided tips for co-existing safely in bear-abundant areas including: feeding birds through water feeds, plantings and nest boxes instead of dropping food on the ground; using bear-resistant containers to store trash; putting trash out the morning of pick-up instead of the night before; keeping bear-accessible windows and doors closed and locked at night; closing garage doors; purging vehicles of bear-intriguing items like hand cream, air fresheners, empty food wrappers and sun tan lotion; storing pet food in a secure enclosure; putting chickens and small livestock in a secure pen at night; picking fruit and produce as soon as it ripens; and using “unwelcome mats.”