A friendly dolphin swimming off the coast of Texas was a symbol of hope for a man who was adrift at sea for more than 30 hours before being rescued, according to reports.

Joey Trevino had been fishing with three friends when their boat started taking on water. Before they could radio in a distress call, the flooded vessel capsized, throwing the crew overboard and causing them to become separated.

Luckily they all were wearing their life jackets, so all Trevino could do was float in the open ocean and talk to himself to keep his spirits up, he told news station KIII-TV. But as the minutes turned into hours, with no sign of rescue, he seriously considered just removing his life jacket to hasten what he thought was inevitable - that is, until an unlikely friend swam by.

Some 50 miles offshore, what is presumed to be a bottlenose dolphin seemingly came to Trevino's aid, lingering around as if to tell him to hold on for a bit longer.

"Well, he kind of bumped me and I kind of rubbed him," Trevino said. "He kind of changed my attitude right there. He kind of like gives you hope."

Several hours after the encounter Trevino was rescued by a tanker from nearby, amazingly surviving 31 hours stranded at sea. His friends were rescued the day before.

While Trevino's heartening encounter with the altruistic dolphin was certainly remarkable, there have been similar stories over the years in which these marine mammals have helped other humans in distress, including actively protecting an ocean swimmer from a shark lurking below.

But why would dolphins feel the need to help a human? Well, it turns out that dolphins will sometimes chose to intervene in a chance encounter to save another creature from a different species, humans included. For example, they have been observed apparently trying to help whales in distress who have become trapped in shallow water.

Some suspect that, at least for the females, it's the innate motherly instinct that kicks in.

"This defensive behavior of dolphins is common when mothers are protecting their calves from predators," the Recanati Center for Maritime Studies at the University of Haifa in Israel said, according to The Associated Press.