Firemen may get the glory when it comes to rescuing cats from trees, but police in the southern German state of Bavaria saved a hedgehog from a life-threatening situation on Friday.

Officers in the town of Schwandorf said they found the hedgehog wandering aimlessly on a local road with a plastic cup stuck on its head.

Police removed the cup after they realized the hungry critter was not able to free itself.

"The hedgehog was looking for something to eat and came across the cup," regional newspaper Mittelbayerische Zeitung quoted the police as saying. "It could not resist the temptation."

Read more: Deadly Ice Cream Tubs Blamed for German Hedgehog Deaths

Mindless driver

Officers believe someone had thrown the cup, thought to have contained ice cream, out of their car window while they were driving down the road.

On Twitter, police made an impassioned plea calling on the local population to be more conscientious about their waste disposal habits: "#Trash does not belong on the street; it belongs instead in the trashcan! #TurnYourBrainOn."

As for the hedgehog, police said it was able to continue on its way without any injuries.

Read more: Raucous Hedgehogs Startle Germans in the Dark of Night