A man and his 12-year-old grandson were found dead several miles apart along an Arizona desert after they went hiking, and authorities say the boy likely died while going for help.

The bodies of Thomas Gillepsie, 63, and his grandson were discovered late Wednesday in the mountains near Gila Bend, some 50 miles southwest of Phoenix, the Maricopa County Sheriff’s Office said.

Officials are determining a cause of death, but it appeared Gillespie either died of exposure of had a medical emergency, the sheriff’s spokesman Chris Hegstrom said.

The boy "probably succumbed to the elements," Hegstrom said. "It's a very tragic accident."

The high temperature Wednesday in Gila Bend was 103 degrees.

Searchers found Gillespie’s body about five miles from the trailhead where their vehicle was parked and the boy’s body about 1.5 miles from the trailhead, Hegstrom said.

The boy had keys to the vehicle, but it wasn’t clear whether the pair had taken food and water with them, Hegstrom said. None was found with their bodies, and they didn’t have a cellphone, he said.

The search began late Wednesday afternoon when a woman called authorities to say she had not heard from her father or son since Tuesday morning.

A hotel manager where the two were staying said the pair left Tuesday morning for a hike on the Mormon Battalion Trial, Hegstrom said. Officials believe the two were going to take pictures of the path between Gila Bend and Maricopa.

The trail was the route taken by a group of volunteers recruited by the U.S. Army to go to California in 1846 during the war with Mexico.

Gillespie was a science teacher at an alternative high school for pregnant teens and teen parents. Tucson Unified School District spokeswoman Vanessa Hernandez said Gillespie was a teacher for 23 years. He was not teaching this summer.

School Principal Anne Dudley said Thursday the entire staff was in shock. She said Gillespie was always patient with students who faced the stresses of being a teen parent.

"He challenged them with high-school-level science classes. When kids struggled with it, he was right there to help them," Dudley said. "Even though they weren't sure they could achieve it, he wouldn't take no for answer."

The Associated Press contributed to this report.