A young black bear was killed after it had been spotted several times near Henry Hagg Lake in Oregon, state wildlife officials said. The bear had become "habituated" or accustomed to the area after people left food for it near Scoggins Valley Park, Oregon Department of Fish and Wildlife officials told CBS Portland affiliate KOIN-TV.

The friendly bear had been fed trail mix, sunflower seeds and cracked corn.

It also appeared in several selfies taken by park-goers. Once the bear became used to humans, it became difficult for it to relocate, experts said, increasing the likelihood that the bear would have dangerous interactions with humans in the future.

Get Breaking News Delivered to Your Inbox

Washington County Sheriff's Office shared photos of the bear, warning people to stay away from the area while they try to get the cub back into the woods. The bear ultimately had to be put down, KOIN-TV reported.

Deputies are working to get this bear cub near Hagg Lake to go back into the woods... please stay away from the area near Boat Ramp A. pic.twitter.com/tI8m5yTbyk — WCSO Oregon (@WCSOOregon) June 13, 2019

"This is a classic example of why we implore members of the public not to feed bears," wildlife biologist Kurt Licence told KOIN-TV. "While the individuals who put food out for this bear may have had good intentions, bears should never, ever be fed."

In Oregon, it is illegal to scatter food or garbage that could attract "potentially habituated wildlife," according to KOIN-TV.

Licence said it is unfortunate that the bear was fed in the first place — especially in an area where many families go for recreation and so close to a busy road.

Jennifer Harrison, who visited Hagg Lake with her family, said she's always wanted to see a bear, but it is unfortunate that humans were the cause of this one's demise.

"They got [the] bear killed and that's not OK," she told KOIN-TV. "They tried to do something they thought was a good thing, but it ended up getting the bear killed so please do not feed the bears."

Harrison said she has seen evidence of bears and cougars in the area and that her neighbor actually took a photo of a bear sitting by the side of the road. It's unclear if the bear in question is the one her friend saw.