This story originally appeared on People.com.
A TV crew for Animal Planet's show River Monster was out on the sea filming in November 2015 when they came across a man on a largely deserted Australian island.
The dramatic moment was captured on camera by the crew and aired on the network last week.
"He had said his last prayer," Stephen Shearman, the director of the episode told Inside Edition. "He was prepared to die and meet his maker."
According to Shearman, the team was trying to solve the mystery of six men who died in a plane crash near to the Gulf of Carpenaria.
But instead, they encountered the man, who they later found out was named Tremine, after they moved from their original shoot location were the water was too choppy.
The crew saw a blue Esky, or cooler box, and said that Tom Hanks might appear – a joke in reference to the 2000 movie, Cast Away.
Just then, Shearman said, "this guy with no clothes was running out of the cave, waving his arms out."
Tremine, a roofer from Borroloola, Australia, told the crew he was out fishing when he decided to leave his boat to go find better oysters.
"He had tried to walk back, got beaten by the sun, and made his way back to the beach," Shearman told Inside Edition. "Meanwhile, he had suffered from sunstroke and was unable to go any further. He then spent that first night on the beach, and the next morning he tried again, but the sun had gotten to be too much for him, and at this point, he is now trapped."
The experienced fisherman has no family and children so no one knew he was missing. He had been stranded without supplies for about 60 hours.
On board was the crew's guide for the day, Ashley, who the news outlet says knew Tremine from Borroloola.
"He was used to him going away and not getting in touch," said Shearman. "It was quite a shock when we discovered this semi-naked guy coming out of the cave, and it was his friend. He was completely dumbfounded."
After the miraculous discovery, the crew brought him back to their lodge before Tremine returned home the following day.
Shearman says they have kept in touch since then and "apart from a bruised pride, he was back to normal."