A homeless man fashioned a long knife to a groomed tree branch and speared a hungry black bear cub that was sniffing for food Friday morning at an illegal camp site in Anchorage.

State wildlife biologist Dave Battle says a sow and yearling have been stealing food from the homeless camp for days. The cub was near a tent Friday morning, and a man in the camp was afraid it would attack.

Alaska State Troopers spokeswoman Beth Ipsen says in an email the man earlier fashioned a long knife to a “nicely groomed branch.” Battle says the man threw the spear, hitting the bear in the side. The bear ran less than 20 yards before collapsing and dying.

Ipsen says David Tandler was given a $310 citation for negligent feeding of wildlife.