Animal Planet's River Monsters captures suspenseful encounters with dangerous sea creatures, but during a recent shoot, the crew came face-to-face with something they never expected to see.

An episode took a dramatic turn when the show's host, Jeremy Wade, and the film crew spotted a castaway on a largely deserted island off the coast of Australia.

Read: Castaway Who Survived 15 Months Sued For $1 Million by Family Claiming He Ate Their Relative

The man had said his final prayer and was "preparing to die," according to Stephen Shearman, the director of the episode "Death Down Under," and one of the five people who found the castaway.

"He had said his last prayer," Shearman told InsideEdition.com. "He was prepared to die and meet his maker."

Shearman explained that the team had originally been attempting to solve the mystery of six men who died in a plane crash near to the Gulf of Carpentaria.

Shearman said they had not originally planned on filming on that end of the island but the waters at their original shoot location were too choppy, so the team decided to move.

"Together, we spotted this blue Esky, or cooler box, that was just sat on the rock," Shearman said.

The team started joking that Tom Hanks might pop out of nowhere, making reference to the 2000 movie, Cast Away.

But suddenly, Shearman said, "this guy with no clothes was running out of the cave, waving his arms out."

Shearman said that the man, whom they later learned was named Tremine, was out fishing one day when he decided to venture off his boat in search of better oysters. He was told that the Sir Edward Pellew Group of Islands was only inhabited by a small aboriginal group, and would be a more interesting area to fish.

Tremine, a roofer from Borroloola in northern Australia, is an experienced hobby fisherman and often takes short camping or fishing trips. But he didn't anticipate the conditions that day. Shearman said Tremine told him that he left his boat and took a wrong turn after a couple hours of digging for oysters.

"He had tried to walk back, got beaten by the sun, and made his way back to the beach," Shearman said. "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.

Read: Country Singer Feared Dead, Friend's Body Found After Pair Went Hunting During Storm

"This guy is super experienced, goes out fishing a lot, he knows the landscape, he knows the dangers, and yet he succumbed to it so quickly."

Shearman estimated that Tremine had been stranded without supplies for about 60 hours. The human body can only survive for up to 72 hours without water.

"Everything was fine, and within two to three hours, everything wasn't really fine at all," Shearman said. "In his own words, he was 'preparing to die.'"

Shearman said the crew's guide for the day, Ashley, is also from Booraloola. Ashley immediately recognized the man emerging from the cave to be his good friend: "He was used to him going away and not getting in touch. 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."

Shearman said that Tremine had no wife or kids, and no one suspected he had gone missing.

When the River Monsters crew brought Tremine onto their boat, Shearman said they immediately gave him water and hydration pills, which he threw up.

"His body wasn't ready for that at all. His condition was quite serious," he said.

Shearman said Tremine was bashful, and initially embarrassed when he met the crew.

"I don't know if you've met Australian men, but they're very proud," he explained. "The idea that he'd gotten lost was mortifying for him."

Read: Grandmother, 72, Rescued Following 9 Days in the Wilderness After Writing 'Help' in Sticks

He said the crew brought the man back to their lodge, where they were staying overnight in between filming, and by the next day, Tremine was fit enough to return home.

"Once he got rehydrated, his strength gained straight back. His recovery was quick," Shearman said.

Since the rescue last November, Shearman said the River Monsters crew has been in touch with Tremine. He said, "apart from a bruised pride, he was back to normal," although Tremine's perspective on life had changed.

In addition to resolving to be more cautious in the wilderness, especially during Australian summers, Tremine made a promise to God that he will start smoking once again.

"He's given up smoking, but he's promised God he's going to start smoking again. If he had a lighter, he'd be able to cook, and he'd have a fire," Shearman said, laughing.

Read: Heart-Stopping Video Shows Captain Fishing off Kayak, Dragged into Water by Giant Shark

"I've made a lot of shows involving survival, but to see it first hand and to see the real shocking powers of what three days without water can do was really sobering," Shearman said.

The episode featuring the discovery aired on Animal Planet last week.

River Monsters airs on Animal Planet Thursdays at 10 p.m.

Watch: President Obama Ate Animal Scraps During His Alaskan Adventure With Bear Grylls