Britain's Vicky Holland was crowned world champion after she finished second behind Australian Ashleigh Gentle at the World Triathlon Series Grand Final in Gold Coast.
Olympic bronze medallist Holland only had to finish ahead of American rival Katie Zaferes to win the title.
The Americans battled with the British team throughout the race as athletes from the two countries led after the swim.
After the transition, the lead group in the cycling then featured four British athletes and three Americans, as well as Norway’s Lotte Miller.
Once the 40km ride was done, Holland, Zaferes and Gentle managed to get away cleanly from the transition area and the three athletes created a gap to the rest of the field.
With just over two laps to go, Zaferes and Gentle upped the pace, leaving Holland five seconds behind.
With three kilometres to go, Holland powered through to pass Zaferes and challenge Gentle.
The sprint finish was won by Gentle, who clocked a finishing time of 1hr 52min, giving her victory over Holland by two seconds.
It mattered little to the Briton, however, as she had done enough to win her first world title.
Zaferes took silver in the overall World Championships, with Britain’s Georgia Taylor-Brown in bronze.
Taylor-Brown finished eighth in the Gold Coast race to keep her third place in the final season standings.
"I can’t actually believe it,” said Holland.
"I thought at one point of the run that it was done because there was quite a big gap there.
"I can’t believe I brought it back in.
"This season as a whole has been absolutely incredible with three wins, two seconds and now the world title.
"It is so much more than I thought I would get out of the year!”
In the junior events, Hungary’s Csongor Lehmann won the men's world title.
Lehmann started with a difficult swim, having lost his cap and googles early on but regained his composure and was fifth out of the water.
In the 20km, New Zealand’s Dylan Mccullough established a 15 second lead.
While he looked dangerous, the extra exertion took its toll and an outstanding run by Lehmann secured his gold medal in 52min 49sec.
The Hungarian was chased by France’s Paul Georgenthum and Germany’s Philip Wiewald, who took silver and bronze respectively.
A similarly impressive run helped Mexico's Cecilia Ramierz Alavez to the women’s junior world title.
Alavez was almost 40 seconds behind the leaders at the end of the swim and 31 seconds back after the ride.
An outstanding run allowed her to pass the leaders, British athletes Erin Wallace and Kate Waugh, and take the gold in a time of 59:11.
“I am completely amazed at this result and really pleased that I could win,” Alavez said.
“On the run I thought that it was possible because I had so much support from my coach and friends telling me that I could do it.
“I have been working very hard on my run over the years and it has become my best leg this year.”