Two men owe their lives to a Vancouver-based search and rescue team after they skied out of bounds only to be hit by an avalanche on Cypress Mountain in West Vancouver.

Brian Parsons and his ski buddy, both from Vancouver, spent Sunday night huddled in a snow cave, cursing what they referred to as a “stupid" decision.

Hours before, the men skied under a rope with a sign that read “out of bounds.” They were hit by an avalanche, and thrown into a deep gully named Tony Baker.

“The area that these guys were in is a gully that is unfortunately named for someone who lost their life in that area,” West Vancouver Police Const. Jeff Palmer told CTV Vancouver. “It’s a dangerous area, the boundary signs are marked for very good reason.”

North Shore Rescue pinpointed the pair’s location Sunday night, but poor weather conditions kept the chopper grounded.

Search manager Doug Pope told The Canadian Press that the men wrote, by text message Sunday night, that they were safe. Volunteers sent instructions on how to stay warm.

As temperatures dropped as low as -6 C, Parsons and his ski partner dug out “a little cave,” set up their skis as “little benches,” and exercised every hour to keep warm.

When they weren’t exercising, they tried to nap or relax, and “cursed each other about stupid we are,” Parsons told reporters.

The men were airlifted to safety just after 9 a.m. Monday morning, ending their 21-hour ordeal.

Mike Dank, of North Shore Rescue said the team “really had our fingers crossed for these guys that they were going to survive the night and fortunately, they did.”

After the rescue, Parson said he was eager to go home.

“I want to see my little six-month-old daughter and my wife,” he said.

Danks said he thinks the men “really learned their lesson.”

Indeed, Parsons has words of wisdom for anyone thinking of doing the same thing: “Don’t, because it happens in a second.”

In a statement, police said the incident illustrates the importance of adhering to ski boundaries.

“West Vancouver Police and North Shore Rescue urge all mountain users to learn the risks of mountain terrain on the North Shore and to respect ski area boundaries for their own safety.”

With a report by CTV Vancouver’s Shannon Paterson and with files from The Canadian Press