The remains of a 16-year-old boy were found near the course of an Alaskan trail race on Sunday after the teen texted a family member during the event that he was being chased by a bear.

The teen was competing in the juniors division of the Robert Spurr Memorial Hill Climb race between Anchorage and Girdwood, The Associated Press said.

The boy had reached the halfway point and was on his way down Bird Ridge trail when he sent the text.

Authorities responded to the area and found his body.

A park ranger shot the 250-pound black bear in the face, but it ran away, the AP said.