By ANNIE KNOX | Associated Press

SALT LAKE CITY (AP) — A young black bear entered a cabin in Cottonwood Canyon and dipped into a bucket of peanuts this week after drinking from a hummingbird feeder on the back porch, according to Utah wildlife officials.

Authorities have captured and released the bear, who they say was likely wading in a nearby river Monday when she detected scents from the feeder's nectar and a grill on the deck.

The two-year-old animal had likely been on her own for a few weeks after leaving her mother, said Scott Root of the Utah Division of Wildlife Resources. “When you smell a treat or something, you're going to go that way if you're a young hungry bear, especially if it's your first year away from mom,” he said.

Wildlife authorities monitored the animal as it napped and ambled outside a stretch of cabins.

By the time most of them arrived, it had made its way inside the home.

Officers managed to shoot the bear with a tranquilizer dart before she ran about 200 yards to the river bank.

They later released the animal in a more remote area, miles away.

“There's a happy ending here in that we didn't have to put the bear down, and that's not always the case,” Root said. He added that the day “was kind of fun in a way” because the animal lived.

Such a break-in is rare, officials said, and noteworthy because the bear didn't appear to be acting in aggression. The only known death from a bear attack, according to the division, occurred in 2007.

The event, officials say, is an early season reminder to campers and cabin-goers to store their food securely.