Deputies in Kings Beach, California came to the rescue of "T-Shirt", the town's famous black bear, who got himself in to a bind while foraging for food in a trash dumpster.

Deputies for the Placer County Sheriff's Office jumped into action when they noticed T-Shirt couldn't extract himself from the trash bin after becoming stuck under a hinged lid. In the video you can see a deputy open up the lid and run away while T-shirt pulls himself out and runs in the other direction.

RELATED: Bear cubs lock themselves in a Tennessee van, then honk until a human lets them out

The black bear is known as T-Shirt to the locals because of the white bib he sports on his chest.

RELATED: Denver woman on vacation in Canada records black bear charging her

Neither the deputies or T-Shirt were hurt in the encounter.