A 17-year-old skier who wandered away from the Sugarloaf ski resort survived two nights in the wild by building a snow cave for shelter, drinking water from a stream and walking toward the sound of snowmobiles during the day, officials said Tuesday.

A snowmobiler who was not part of an official search party found Nicholas Joy, of Medford, Mass., at about 9 a.m. Tuesday on a trail west of Sugarloaf Mountain, the Maine Warden Service said. Joy was taken to Franklin Memorial Hospital in Farmington for evaluation, said Lt. Kevin Adam, the search coordinator.

The weather conditions were bad enough that the search had to be suspended Sunday and Monday nights, and Joy survived by building a mound of snow that he fashioned into a shelter that he could crawl into, Adam said.

Joy was in "remarkably good shape" for spending two nights out, and it helped that the winds weren't as strong in the valley where he was found as they were up on the mountain, Adam said.

"But he did the right thing in building a snow cave, and obviously he's still alive to talk about it, so he made some good decisions," Adam said.

Joy and his father split up on Sunday after taking a chairlift to the top of the mountain and took separate trails down in what was going to be the last run of the day, officials said. They planned to meet in the Sugarloaf parking lot and drive back to Massachusetts, and the father called for help when his son didn't show up.

It turned out that the boy inadvertently skied off his trail and ventured down the west side of the mountain before realizing he couldn't make it back to ski trails, Adam said.

The warden service, the Sugarloaf ski patrol, Navy SEALs, U.S. Marines, U.S. Border Patrol, area rescue squads and others had been searching for Joy on skis, snowshoes and snowmobiles, officials said.

Wardens said Joel Paul, a snowmobiler from Massachusetts, found the boy. Paul was not part of the official search team, but had seen the story on the news and decided to conduct an impromptu search of his own on a trail known as the Caribou Pond Road, Adam said.

When Paul brought Joy to an awaiting ambulance, the boy had a tearful reunion with his parents. David Leaming, a photographer for the Morning Sentinel newspaper, heard Joy say to his father: "I'm OK. I'm just tired."

Sugarloaf General Manager John Diller said he cried when he heard Joy was found. "It was almost like a miracle," he said.

Diller said one of his staff members heard Joy say he liked to watch TV survival shows. "Maybe that's a little bit of what helped him organize," he said.

One or two skiers get lost and are reported missing at Sugarloaf most winters, with skiers sometimes spending a night in the outdoors before being found. In a highly publicized case three years ago, four teenage snowboarders got lost after going out of bounds into ungroomed expert terrain, but they survived a cold night in dense woods and deep snow by continually moving around to stay warm.