(CNN)  California wildlife officials shot and killed a bear that attacked a camper Friday.

The attack happened early Friday at the Yellow Jacket Campground near the Union Valley Reservoir, southwest of Lake Tahoe.

Officials say the camper woke up to hear the bear going through an ice chest.  He confronted the animal, and it charged and scratched the man's face.

The man shot the bear, but it got away.

Wildlife rangers tracked the bear down and killed it late Friday.

This incident serves as a good reminder for anyone camping this weekend, or anytime, to make sure all food and trash is secured and not left in ways that could attract bears.