The Maryland Department of Natural Resources posted a Periscope live stream showing state animal officials freeing a deer, known as 'Jughead', from a plastic pretzel container after it had been tranquilized. (Maryland Department of Natural Resources)

Jughead the deer is free.

Or at least his head is. A deer that was running near a neighborhood in Bel Air, Md., had gotten its head stuck in an empty plastic pretzel container more than a week ago. Wildlife officials had been trying to tranquilize it so they could remove the container, but the deer evaded them.

Neighbors in the area about 30 miles northeast of Washington nicknamed the critter “Jughead.”

On Sunday, Paul A. Peditto, director of the Maryland Department of Natural Resources’ Wildlife and Heritage Service, tweeted that the deer had been captured and was “ready for release” once the bucket was removed.

Jughead, the deer, after being tranquilized to get an empty plastic jar off its head. (Courtesy of Paul Peditto- MD DNR)

Wildlife authorities told the Baltimore Sun they “successfully freed the deer from the container” and “monitored him for more than an hour until he recovered,” according to Gregg Bortz, a spokesman for the DNR.

Crews asked residents to stay inside after they hit the deer with a tranquilizer dart. Neighbors also were asked to keep their yard lights on so officials could see in the darkness.

It was the culmination of a hunt that spanned the weekend. Concern grew as the animal went without food or water for an extended period of time, according to The Sun.

Catching Jughead was no easy task. Deer are easily spooked, and high winds last week made it difficult to shoot the tranquilizer, experts said.

It is believed Jughead went for the empty container because of the leftover salt. Authorities believe the deer is male and about seven or eight months old.

Such a scene isn’t uncommon in the world of wildlife.

A 175-pound black bear had to be rescued after it got its head stuck in a milk can in Frederick County, Md. It was tranquilize, then wildlife officials used a small saw to remove it.