RINGWOOD, N.J. — A frightened bear cub got its head stuck in an oversized cookie jar while rummaging through some trash and had to be rescued from a tree in New Jersey.

Environmental Protection Department spokesman Larry Ragonese says the 6-month-old cub apparently found the animal crackers jar Friday night in Ringwood, near the New York border.

As the 28-pound animal tried to eat what remained in the jar, he apparently pulled it over his head and it got stuck.

The cub became spooked when approached and went up a tree, but got wedged about 40 feet up.

DEP staffers arranged netting in case the bear fell to the ground. After the animal was tranquilized by a DEP biologist, it was brought down and local firefighters gingerly cut the jar off its head.