A torrent overturned his raft and plunged him under. Caught in the submerged branches of a willow tree, he struggled to reach the surface, becoming more tangled and, finally, passing out.
After Yelavich lost consciousness his body relaxed and he popped back to the surface. This near-death experience was the most dramatic of many potentially fatal mishaps that occurred on his travels.
There was a fall down cliffs in Raglan (resulting in broken ribs), liver poisoning after drinking dirty water in Dunedin. But he was undaunted; ignoring medical advice he continued to walk, climb and swim his way around the coast.
Inspired by the movie Into the Wild (but with a happier outcome), Yelavich's adventure took him right into the heart of our natural environment. There were moments when it could have gone terribly wrong. "But I've always been lucky - the kind of person who walks away from a car accident."
Yelavich's epic journey ended almost two months ago, on August 23. Starting at Cape Reinga, his adventure took him over rocks, along beaches, through the sea, up mountains and down cliffs.
He survived on his wits and his instinct - hunting, fishing, gathering wild plants to eat and drinking fresh water from streams that flow into the ocean. It ended where it had begun - the lighthouse at Cape Reinga.
Now, he's exchanged sleeping rough in the wilderness for the comforts of civilisation. But the 20-year-old now finds the very return to familiar comforts is the thing most alien. "I find it hard to sleep in the same bed every night. My body gets too used to it and it's actually painful. There's heaps of food around, but it's so expensive. I'm too used to living off the land."
After such an epic adventure it's understandable he would experience something of a comedown.
"On my last day I thought I'd feel so happy, but I was actually really low. I'd been on such a high for most of the journey, but this started dissipating as I got closer to the end."
It's a common syndrome that everyone feels to some degree. The let-down the day after your wedding; the hollow feeling after running your first half-marathon; the post-holiday blues after the trip you'd spent months planning.
According to psychologist Sara Chetwin, it's common to feel a bit aimless after achieving a huge goal.
"People who've set themselves a big challenge and achieved it will often feel huge satisfaction about this. But there is also the possibility of them wondering 'what next?' and asking themselves where they will go from here."
Sitting in a coffee shop at Smales Farm on Auckland's North Shore, Yelavich doesn't seem like an epic adventurer, just a regular, friendly young bloke. Polite and chatty, he is accompanied by his girlfriend, Ngaio Gregory, who he met in Coromandel on his way back up the East Coast a few months back.
"It's weird being out in nature, then coming back to civilisation and finding nature only existing in a pot," he laughs, nodding at a straggling plant near our table.
Yelavich's dream of circumnavigating the country on foot was born on one "random drunken night with my friends" in Cromwell years earlier.
Auckland.
He'd gone down there to do outdoor pursuits. The idea came to him in a revelatory flash. "I remember saying, 'How cool would it be to walk around the coast of New Zealand'. It was just a dream. I never thought it would really happen." Years went by and he barely thought about his late-night declaration. But it was there in his subconscious - the seed of an idea waiting to germinate.
Those four years hadn't been the best. Yelavich had been kicking about, looking for a purpose, getting into trouble. There were bad influences - the wrong crowd, drugs, alcohol - he didn't have a goal and life was going nowhere.
The lowest point came when he got a job holding a sign for Canterbury clothing on the roadside. "I was on minimum wage, there was no chance of promotion, I had no real friends. It just came to me - why am I doing this when I could be living my dream?"
Within a month, he was on the road. His mates didn't believe he would do it.
"I invited them over to my place for drinks and put up a big map of New Zealand. I told them I was going to walk the coast. They just laughed."
His dad, who'd always been his biggest cheerleader, thought it was a terrible idea. But he was determined.
"If people didn't believe me and didn't want to help me, I decided I'd do it all myself," he says. "I set up a website outlining what I wanted to do. I made up flyers and gave out brochures at Glenfield night markets. People started taking notice."
This determination eventually won over his dad. "He ended up taking me to Cape Reinga. It took him about three weeks to come on board after that. But he ended up being an amazing support."
The journey began on February 1, last year. With just one week of training (he'd run the equivalent of a marathon every day that week, but got shin splints and had to stop), he wasn't exactly prepared physically.
But he'd completed a government-run Limited Service Course (LSV) on which he learned outdoor skills. He'd topped the class and knew he had aptitude in this area, and was confident he could survive in the wild.
The rules of engagement for Yelavich's trip were simple. He'd live off the land, he wouldn't accept lifts, he'd carry as little as possible.
His pack (which was 50kg when he set off) contained only hunting equipment, a tent, sleeping bag, and a sleeping roll. There was a survival kit and he carried a smartphone and a satellite phone - that was it.
The start from Cape Reinga was a low-key event with little interest.
But soon he gained followers through his Facebook site and webpage, people whose online input would provide much-needed morale boosts along the way.
West Coast.
Initially, finding food was the main challenge. He'd never hunted before, and living off the land was new to him. While he'd watched hunting videos in preparation for the trip, the reality of killing animals was quite different. But he learned quickly.
"Killing is just common sense," he says. On the trek he killed wild goats, pigs, possums and rabbits with crossbows, air rifles and knives.
He also foraged, finding wild kumara and other vegetables along the coast. The pure protein and fresh produce fuelled muscle growth and strength. People he met on the way also fed him. "On the East Coast I probably spent 50 per cent of my time staying and eating at people's houses. I experienced so much incredible kindness and generosity. It was amazing."
However, the West Coast was another story. Much of it is uninhabited, especially in the South Island; coastal land that's never been touched by civilisation.
The Kahurangi Coast, possibly New Zealand's loneliest stretch of coastline, from Kahurangi River to Heavy River - was Yelavich's favourite part of the country. This is an enchanted place, with prehistoric forests spilling down to untouched beaches.
"It's so pure, all original native vegetation," says Yelavich. "I walked through forests that no one had ever been in before."
Although the beauty of the West Coast provided Yelavich with much inspiration, the isolation was sometimes difficult. A naturally gregarious person, he found the solitary nature of his travel hard at times.
"I didn't think about it before I started. But I did get very lonely. It was difficult to deal with."
But the wilderness had a grip on Yelavich and he kept going, although at times he felt like giving up.
"I often called my parents and said 'I can't do this any more'. They always said, 'Well, you can walk home then'."
The trip that was meant to take six months actually took more than 18. After such a long time on the road, his last day was one of mixed emotions. "It was really, really weird, to be honest."
For Yelavich, the key now is not to stand still. And he hasn't had too much time to ponder his next move. He's been approached to make a TV show, do speaking engagements and there's a book in the works, commissioned by Penguin.
On October 23 he'll take part in Red Bull Defiance, a two-day race over 153km near Wanaka that includes running, kayaking and cycling. He also plans a week on Rangitoto, exploring the island and documenting it on YouTube; there are plans to do the same in the Waitakere Ranges.
Although the circumnavigation is over, he has enough planned to stop feeling nostalgic about time on the road. "I totally miss travelling, but I have a lot more adventures to come."
He has a new philosophy on life. "The past year and a half has proven to me that anything, absolutely anything, is possible, as long as you set your mind to it."