CHEYENNE, Wyo. (AP) — A 13-year-old boy who got separated from his Boy Scout group during a hiking trip in the Wyoming wilderness survived partly on bugs and tree bark for the nearly 37 hours he was alone, officials said Monday.

Searchers found Garrett Hunter of Draper, Utah, in good health about 10:15 p.m. Sunday after happening to camp near him for the night and calling out his name, according to Sublette County sheriff's Sgt. Travis Bingham.

Garrett told media after a helicopter ferried him to an airport that he worried about whether he would see his family again. When he was found, he said his first thoughts were "Hallelujah! I'm home free."

The boy was brought out of the mountainous Bridger Wilderness on Monday morning after rough terrain and darkness forced him and his rescuers to camp overnight.

Garrett became separated from other Boy Scouts and their leaders around 9:30 a.m. Saturday when he went off a trail to go to the bathroom, Bingham said. The group of about 20 boys and adults were on the way out from a weeklong, 50-mile (81-kilometer) backcountry hiking trip.

Garrett had a sleeping bag, a water filtration device, a little food and part of a tent. Not sure how long he might be lost, the boy ate ants and bark to conserve what little food he had.

"He didn't like bark so much, but the bugs weren't too bad," Bingham said after interviewing Garrett Monday. "He had trouble starting a fire with the fire starters staying lit. He improvised, using bug spray with his lighter even though his mom told him not to and did get a fire that one night."

Searchers, aided by dogs and a helicopter, scoured the rugged terrain Saturday afternoon and Sunday. The search was suspended about 7 p.m. Sunday, but one group of volunteers decided to camp near a lake that night.

When one of the volunteers yelled out Garrett's name, they heard a reply: "Help," Bingham said.

The boy was found on a ledge overlooking the lake where he had stopped to wait for rescuers, Bingham said. Authorities said he did everything right to survive, including staying in one place after initially hiking about a mile.