A surprise attack by a bear caused a teenager to have to make a life-or-death decision, and fortunately, he survived the scary ordeal.

The 17-year-old male from Montana was thrown against a tree while in Madison Valley on Sunday afternoon looking for shed antlers, as shed antler hunting is a popular outdoor activity. “He turned around to see a bear charging at him,” officials from Montana Department of Fish, Wildlife & Parks said in a release.

“When the bear let go, the teen fell over and attempted to crawl between two trees and protect his head and vitals. The bear then pinned him face-down on the ground,” the department added. 

Fortunately, the teenager was carrying bear spray, which was in his backpack, and he was able to spray the bear, leading the animal to flee.

The victim only suffered minor injuries, and has since been released from Madison Valley Medical Center. Based on the description he gave officials, it is believed he was attacked by a grizzly bear.

Just last November, a male grizzly bear killed Valé​rie Thé​orêt, 37, and her infant daughter Adèle Roesholt at a remote cabin in Canada’s Yukon territory before their bodies were found by the child's father.