It was so close yet so far for Hayden Wilde, who has claimed silver in a dramatic triathlon in Paris.
Wilde looked to be cruising to gold, but was pipped on the home stretch by his great rival from Great Britain, Alex Yee.
Yee came out of nowhere to overtake Wilde, crossing the tape in one hour 43 minutes and 33 seconds as Wilde settled for silver and New Zealand's second medal of the games.
He had a rough start in the Seine, but Wilde closed the gap on the bike and then powered home in the run.
Italy's Alessio Crociani shot out in front early in the swim,while it was a poor first lap from Wilde, who came out in 30th place with McCullough slightly ahead in 19th.
Wilde began to make up ground on the bike, quickly moving to 24th with South Africa's Jamie Riddle in first.
Wilde was now just 30 seconds back from the leader, McCullough a few seconds further in front, in 18th.
Wilde led the chasers who inched to just four seconds behind the lead group.
Wilde cost himself few seconds on the transition fumbling with his shoe, but his prowess on the run soon came to the fore as he moved to fourth and then quickly to second behind Yee who surged ahead early in the final leg.
Then two favourites were then neck and neck in first and second with 8000m to go.
As Yee faded from his strong start, Wilde powered ahead by 15 seconds.
With less than 3km to run, Wilde held his substantial lead over Yee.
But just as the commentators were calling it for the kiwi, Yee surged out of nowhere to snatch the victory.
An exhausted Wilde crossed the line to take silver, while Frenchman Leo Bergere took the bronze.
Wilde's teammate Dylan McCullough finished 19th.
During the cycling, McCullough had been part of the lead group for a long time, well ahead of Wilde in the chase group. However, he dropped back to create a slipstream for Wilde and make it easier for him to gain ground.
After crossing the finish line, Wilde waited at the end of the chute for McCullough to finish before going through marshalling.
He gave McCullough a big hug and pat on the back for the work his teammate did for him on the bike leg.
Speaking to Sky Sport, Wilde said his silver would not have been possible without his teammate.
"I just want to, first off, say a massive thank you to Dylan McCullough. If it wasn't for him coming back, I wouldn't have done that," he said.
"He saved me a lot of energy on the bike."
Wilde said the pair had a game plan - if there was a gap of about 15 seconds, McCullough would drop back to help.
"I couldn't have done it without him. New Zealand owes him some sort of medal or something."
Despite being pipped for the gold, Wilde was thrilled with his performance.
"Just a great race overall. I missed out on the end, but we recover now and try to get another medal."
He said it was a nervy finish seeing Yee close in.
"I looked back, and there was a gap, and he looked composed. It was hot. So that might have been an effect, but I gave it everything, and I'm stoked for Alex as well. Just to have an even race, no penalties, just a pure, good foot race, and it was exciting."
Coach Craig Kirkwood told RNZ it was an "epic race" from both Wilde and McCullough.
"Dylan did an amazing job. Just dragged Hayden's group back from 20 seconds back to the front group, and just the ultimate team player, so huge appreciation for him."
He said it was "awesome" to watch Wilde leading the pack until the last few hundred metres of the run.
"He tried, he gave it everything he could - that's all you can ask for really."
Wilde had wanted the gold "desperately" but a silver Olympic medal was not bad, and it was important to keep that in perspective, Kirkwood said.
The team had been "pretty confident" that Wilde could beat Yee, but it was not to be, he said.
"Alex has definitely got weaknesses, so we tried to exploit those. I thought he'd got [it] right today, but just unlucky to not hold on."
Speaking to RNZ, McCullough said he was "so proud" of Wilde.
The team had discussed their approach before the race and had stuck to it faithfully, he said.
McCullough said the swim was "brutal", and compared the conditions to a boxing match.
The swimmers never got any clear water and were banging into each other and fighting the current, he said.
"It's kind of like survival mode and trying to fight through that swim."
He said he was "really happy" to score in the top 20 in his first games and proud to call himself an Olympian.