Netherlands have been crowned Women's handball world champions for the first time, edging Spain 30-29 with a last-second penalty in Kumamoto, Japan.
The Spanish will have one last chance to qualify, at the IHF Olympic Qualification Tournaments in March 2020.
Dramatic last second win for Netherlands
With the scores tied at 29-29 and seconds remaining on the clock in the final, Netherlands were awarded a penalty.
Lois Abbingh calmly slotted her seventh goal of the match to become the tournament's top scorer, and to start her team's wild celebrations.
After medalling at the last two world championships, the Dutch team will be relieved to finally have their gold medal, while Spain will take much confidence from reaching their maiden IHF Women’s World Championship final.
Just as they had in the semi-finals against Norway, Spain came racing out of the blocks to take an early six-goal lead in the final.
But the more experienced Netherlands, wearing white, refused to panic and drew the scores level at 9-9 after 16 minutes.
The lead continued to exchange hands, with Dutch goalkeeper Tess Wester keeping her team in the final with several critical interventions.
The Netherlands pulled ahead 22-17 on 40 minutes, only for the resilient Spanish team to pull the teams level again on 52 minutes.
With the teams still neck-and-neck and only seconds left in the match, a penalty was awarded to the Netherlands in what was to be a fittingly dramatic end for the best match of the tournament.
Abbingh stepped up, and with a stuttered run, and a dummy throw, she scored to send her team and their fans into raptures.
Earlier on Sunday, Russia sealed the bronze medal.
The Rio 2016 Olympic champions beat Norway 33-28 in what was a battle of the two most successful teams in the history of the Women's World Championship.
It was a case of quality over quantity for Russia who managed four fewer shots than their opponents, but made more of them count.
Anna Vyakhireva was the star of the show for the winners, contributing a game-high nine goals.