A snowboarder who triggered a terrifying avalanche in the Pyrenees mountains was recorded in his race against the deadly path of the snow-packed flow.

Alfons Garcia, from Barcelona, was snowboarding high in the Aran Valley in the Pyrenees in December when he triggered the avalanche.

The moment was captured on video as his friends watched him desperately race to escape the dangerous avalanche on his snowboard. Luckily, after a few tense moments, Garcia managed to outpace the cascading snow. His friends can be heard cheering in relief in the footage.

The Lauegi D’Aran, which provides information on snow and avalanches in the region, says that alert warnings avalanche four and five, the most severe, had been posted for the area at the end of December, due to snowfall, strong winds and rising temperatures.

Snow on the northern slope of the Pyrenees is unstable due to weak layers formed by ice and snow as a result of rain, the service says. Between November and December, there were 40-60 cm (1.3-1.9 ft) of snowfall, and several natural avalanches occurred. Lauegi D’Aran reported a number of people were injured at the start of December due to the snow’s instability.

“The powder snow we had on the crust of frozen rain transformed into large angular crystals and these, located on top of a similar smooth crust, created a weak top layer,” it explains.

A close call similar to Garcia’s was also captured in the same area a few days earlier. Adria Millan was freeskiing in slopes near Baqueira Beret in the Aran Valley when he too found himself racing against a wall of falling snow.

A post shared by Adrià Millan Pla (@millan_adria) on Dec 19, 2017 at 6:10am PST

“It's a run I know pretty well and probably for that reason I felt too confident, then the unexpected happened,” Millan wrote on Instagram. “Guys, take care out there, sometimes we get too excited without realiz[ing] the real risks. I was lucky and once safe at home I can say I learned about my own mistake.”