Lukas Cavar screamed for hours, hoping to get someone’s attention. Bats, salamanders, crayfish and beetles were his only company.

Stranded in a cave without food or water, he was unsure that he would ever see his family again. He wrote notes to loved ones on his phone, which did not have a signal. He licked moisture off the cave walls and became so hungry he thought about eating crickets.

What was supposed to be a fun adventure turned into a hellish 58 hours for Mr. Cavar, a 19-year-old Indiana University student who was left behind during a group expedition on Sept. 17 to Sullivan Cave near Bloomington, Ind.

When Mr. Cavar this year joined the university’s Caving Club, which organized the trip, he had never been spelunking before. During the outing, he and 11 others, including a university staff member, divided into two groups and explored for hours. Each person was assigned a “buddy” as a precaution, Mr. Cavar said.