How do you rescue a bear cub that's trapped in a dumpster? Very carefully.

In a scene worthy of a cartoon, sheriff’s deputies in California used a ladder to free a curious cub that tumbled into a trash receptacle near Lake Tahoe early Tuesday morning -- after the cub's sibling and mother failed in their attempts to help it get out.

Video tweeted by the sheriff's department shows the sibling cub standing on top of its mother's back, in a bid to reach the trapped bear.

Placer County sheriff’s deputies responded after a King's Beach motel reported the situation.

GIRL APOLOGIZES TO NATIONAL PARK SERVICE FOR TAKING A ROCK HOME, SENDS ADORABLE LETTER

The deputies lifted the dumpster’s lid and placed a ladder inside while the cub's mother and sibling waited behind a tree.

CLICK HERE TO GET THE FOX NEWS APP

The trapped cub was soon able to climb up the ladder and run immediately to its family.