Glad you could scare it off and it didn't turn on you. I've read that they can be really aggressive.
You'll probably need STRONG electric -- like for bear.
I have heard that sometimes bears will smash into the feed storage and ignore the chickens.
*IF* it's a bear the only solution will be a strong electric fence.
Electric fence is good against most, not all, but most predators and pests.
I suggest looking for footprints, claw marks, hair, etc...