T-Shirt the bear found himself trapped in a dumpster on Monday morning.

A big bear got into a spot of trouble on Monday while dumpster-diving in search of a delicious meal. Luckily for the bear, who has been nicknamed T-Shirt, help was at hand to rescue him. Deputies in northern California helped free T-Shirt the bear from the dumpster he found himself trapped in. The incident took place in Kings Beach near Lake Tahoe and was recorded on a dashcam video, reports Fox News.

The dumpster was apparently locked, but he found a small opening in the lid, designed for dropping trash, and managed to squeeze in. Getting out was another matter altogether.

Footage shared on Twitter and Facebook by Placer County Sheriff's Office shows the bear trying to squeeze out from the dumpster unsuccessfully. Deputies Bertoni and Staley then unlock the lid and try to coax him out by lifting the covers. T-Shirt the bear was eventually able to push the lid open and clamber out.

This isn't the first time that the huge bear has had run-ins with the law. "He is a local bear and has had prior run-ins with our deputies. They named him "T-Shirt" because of the white patch of fur on his chest," Placer County Sheriff's Office wrote on Facebook.

Incidents of bears getting trapped in dumpsters are not uncommon as the animals often forage for food there. In September, a heartwarming scene played out in California recently when cops spotted a bear cub, along with its mother, trying to rescue its sibling from a dumpster.

Click for more trending news