Remopita Pongi owes his life to a bobbing piece of driftwood after his Google Maps shortcut home almost ended with him lost at sea.
Pongi, 29, had been on a more than 80km trek home from Opotiki to Kawerau on Saturday morning when a look at Google Maps suggested he could take a shortcut by swimming across a tidal estuary opening onto the Bay of Plenty.
But once in the water, a riptide pushed him 2.5km out to sea.
The log helped him stay afloat for three hours, before he pulled his soaked iPhone from his pocket and called for help.
"I was just paddling along, and the waves were getting a bit carried away and I happened upon a piece of wood," he said.
"I just grabbed on to that and floated."
Pongi was eventually plucked from the water by a jetski rider and the Whakatane Lifesaving Club in what had proven a most unusual tale from start to finish.
His troubles had started the night before when an argument with his brother left him stranded near Opotiki.
Having nothing but the clothes on his back, he spent the night on the beach, forced to light a fire to keep warm.
With no food, he noticed birds pecking over a snapper head and rushed in to steal it and cook it up.
"I ate what I could and the rest burnt," he said.
That night on the beach "wasn't absolutely freezing", but it was bloody cold.
"The sand wasn't warm, and the beach fire could only warm me up so much - it wasn't a lovely night," Pongi said.
The next morning he faced an 80km walk along the road to get to his mum's house at Kawerau.
A look at Google Maps suggested 25km could be slashed from the journey if he instead walked along the coast and swam from Ohiwa Beach across the estuary at Ohiwa Bar to Ohope on the other side.
But the riptide was too strong and Pongi was soon left clinging to his driftwood.
As the coast drifted further away, the ocean grew colder and he said "quite a few prayers".
"I tried to remain composed because I know panic is no good in those life-threatening situations," he said.
Pongi planned on waiting for the tide to turn and push him back to shore.
But a couple of hours in and he was shivering and having to remind himself to keep kicking, signs of the "early onset of hypothermia".
"I thought f*** that, I've got to get a little bit of help here, any longer in the water and I would have started seizing up."
He reached for his trusty iPhone X in his pocket and dialled 111.
"I just pulled it out and it was still working," he said.
"I had searched up whether [the phone] was waterproofed or not. They said it was waterproof up to a metre, so I thought: 'well, that won't damage my phone'."
Police then put the Whakatane Surf Lifesaving Club in touch with Pongi and he directed them to his position.
But as he was waiting, a jetski playing around in the ocean chanced upon him.
"He saw my head bobbing up and down in the water and went along to investigate and found me."
The jetski transferred Pongi to a rescue boat that then took him to the Whakatane Surf Lifesaving clubhouse where he jumped into a hot shower.
"When we picked him up, he seemed okay. He was conversational and we weren't too alarmed," club spokesman Craig Julian said.
"[But] after that he didn't look too good so we called an ambulance."
St John Ambulance territory manager Richard Waterson said paramedics took Pongi to Whakatane Hospital because while his vital signs were okay, he had turned "blueish".
At hospital, he was given food and "warmed up" before the busy staff began to usher the ever unfazed Pongi out the door.
Fortunately, he didn't have to walk the rest of the way to Kawerau and was now "safe and secure", he said.
He was also "very grateful" to his rescuers after his epic day out.