Two teenage snowboarders rescued Monday from the Candian backcountry had burned their homework to stay warm through the night after getting lost in poor weather conditions, officials said.

The boys, both aged 16, failed to return from their Sunday snowboarding outing at the Whitewater Ski Resort near Nelson in southern British Columbia, Nelson Search and Rescue said in a news release.

AVALANCHE IN REMOTE AREA OF CANADA KILLS 2 SNOWBOARDERS FROM ALASKA

A 10-member ground team patrolled the roads overnight, but their efforts to attract the teens to safety by shining lights were unsuccessful, the release said. A helicopter was dispatched on Monday morning to help ground teams in the search along the backcountry.

Rescuers found the boys at 8:45 a.m. in the Qua Valley, just south of the resort, and flew them to safety.

The boys were rescued during a break in the snowy weather that allowed a helicopter, like the one pictured above, to spot them, officials said. (Nelson Search and Rescue, File)

Jim Kyle, manager of Nelson Search and Rescue, told the CBC that the boys were “extremely lucky” that the snowy weather conditions let up long enough to allow the use of a helicopter.

He added the lost teens “did all the right things" until they could be rescued, one of which was to build a fire to stay warm.

WOMAN RESCUED FROM DONATION BIN CLAIMS SHE WAS TRAPPED FOR DAYS, BUT POLICE HAVE QUESTIONS

"One young person had homework in his backpack and that definitely helped keep the fire going," Kyle said.

Cpl. Jesse O’Donaghey, Royal Candian Mounted Police Southeast District Media Relations Officer, shared details on the boys’ overnight survival against the elements with The Nelson Daily.

"We are told that the pair had the wherewithal to construct a shelter and build a fire for warmth, and more importantly stay put and wait for help," O’Donaghey said.

CLICK HERE FOR THE FOX NEWS APP

Both boys appeared in good health at the time of the rescue Monday morning, according to officials.