A US student was trapped in a cave for three days without food or water after he was left behind on a group excursion.

Lukas Cavar, a first year student at Indiana University, was on a spelunking trip when he became separated from the rest of the group.

The terrified 19-year-old survived by licking the moisture off the cave walls and left messages to his family and friends on his phone fearing he wouldn’t make it out alive.

When the forgotten student reached the entrance of the cave he found it was padlocked shut. He couldn’t get any reception on his phone and shouted for hours trying to attract the attention of passers-by.

“I managed to get some water from the cave walls, by basically licking the moisture off the wall,” he told Reuters.

“My biggest worry was not making it out alive. I was afraid I would never see my friends or family again.”

The teenager was eventually rescued after 60 hours when other members of the caving club and his parents reported him missing.

He didn’t require any medical attention and said the first thing he wanted to do after being rescued “was eat and drink and put on some warm clothes”.