Great Britain's Ben Cornish dramatically won the gold medal in the men's finn on the final day of the World Sailing 2017 World Cup Final in Santander.
Cornish, Hungary's Zsombor Berecz and another British competitor, Ed Wright, were all in contention going into the last race.
The start of the race did not go entirely to plan for Wright and Berecz as there was an individual recall, which meant the pair both had to restart the race.
The advantage swung the way of Cornish, but he was soon penalised for pumping, resulting in a penalty turn and it looked like his chance of gold had gone as Berecz and Wright took the initiative.
But late drama ensued as Berecz received a penalty of his own on the run to the finish, enabling Cornish, who had already overtaken Wright, to move into gold medal position.
Cornish crossed the line in fifth and Berecz in seventh, which put the pair level on 48 points.
However, as the Briton had finished ahead in the medal race, he claimed gold.
Wright sailed through in 10th to complete the podium.
"You've just got to keep fighting and racing in this sort of stuff," said Cornish.
"We raced here the other day and the places change all the way to the finish line.
"The penalty I got, then got passed on to Berecz for a similar offence.
"You can never give up until you're over the line.”
Belgium's Evi van Acker had already secured the gold medal in the women's laser radial so focus was on the race for the silver and bronze.
Another Belgian, Emma Plasschaert, and Denmark's Anne-Marie Rindom occupied the podium spots heading into the medal race, but Uruguay's Dolores Moreira and Greece's Vasileia Karachaliou were not far behind.
Moreira found herself in silver medal position when she was penalised for pumping her sail and had to do a penalty turn.
She dropped to second, her eventual finishing place, which handed Karachaliou the initiative.
Karachaliou, winner at the American World Cup Series event, came through in fourth which gave her the overall silver.
Moreira had a nervous wait for the pack behind her to follow and with Plasschaert in eighth and Rindom in ninth, she managed to take bronze.
The men's laser medal race saw a large number of penalties distributed due to sailors pumping their sail, but Jean Baptiste Bernaz of France did just enough to seal gold.
Coming seventh saw him finish just two points ahead of German Philipp Buhl, who overtook Charlie Buckingham of the United States into silver.
The American rounded out the podium.
Panagiotis Mantis and Pavlos Kagialis of Greece lived up to their billing as one of the pre-regatta favourites in the men's 470.
The Greeks faced fierce competition from Austria's David Bargehr and Lukas Mahr, Americans Stu McNay and Dave Hughes as well as Italy's Giacomo Ferrari and Giulio Calabro all week.
But they sailed their way to a seventh in the medal race to clinch gold.
The Austrians finished third today to confirm silver while the bronze went to Ferrari and Calabro, who won the medal race.
Great Britain's Rio 2016 Olympic champion Hannah Mills, sailing with Eilidh McIntyre, came back into the women's 470 class by claiming a dominant gold.
Mills and McIntyre had just three days sailing together before the World Cup Final and found their groove quickly, winning five of the week's 11 races.
They finished 19 clear of Dutch duo Afrodite Zegers and Anneloes van Veen, who held on to silver forcing Spain's Silvia Mas and Patricia Cantero into third.
Britain won the Nations Trophy, awarded to the best performing team at the World Cup Final, after they won nine medals, three of each colour.
France took second on four medals, consisting of two golds, one silver and one bronze while Brazil followed in third with two podium topping performances.