Serbia booked their place at Tokyo 2020 when they were crowned champions of the International Swimming Federation (FINA) Men's Water Polo World League Super Final with a thrilling 11-10 victory against Croatia in Belgrade.
Serbia climbed back to the top of the game with Filip Filipovic scoring the winning penalty with just 17 seconds to go to secure a home triumph against their arch-rivals at the Tasmajdan Pool.
An outstanding match was hit by torrential rain but it could not stop the party in Belgrade as the 3,000 spectators remained in the stands to cheer their side to glory.
Croatia started the match better and took a 4-1 lead after ten minutes but a devastating spell from the hosts saw them score five without reply to pull level at 5-5.
Ante Vukičević pulled Croatia out of their slump for a 6-5 half-time lead and they remained ahead 8-7 after a close third period.
As the heavens opened at the start of the final quarter, the game continued as Vukičević grabbed his fifth goal as Croatia levelled at 10-10 with just 46 seconds left.
A penalty was awarded to Serbia with just 17 seconds left and Filipovic made no mistake to seal the World League crown and a prize fund of $100,000 (£78,516/€87,940).
History was made in the third place playoff when goalkeeper Dani Lopez became the first goalkeeper to get on the scoresheet in Spain's narrow loss to Australia at Tašmajdan Sports and Recreation Centre.
In a balanced match, Australia took a 7-4 lead into the third quarter and had levelled at 9-9 midway through the final period.
Australia redressed the balance with two goals for an 11-9 lead before Lopez sent the ball long and into the net with just 24 seconds go.
Spain couldn't find another moment of magic though and Australia took the bronze medal.
Earlier in the day, Hungary claimed fifth spot with a 15-13 win against Japan, while Kazakhstan fought back to defeat Canada 17-16 in a high-scoring encounter to finish seventh in a penalty shootout.
History was also made in the Hungary match when Japan was awarded a goal after a video review - its first use at a major FINA event.