Spain continued their recent dominance of international football by edging past France - who fought back from 3-1 down to force extra time - to win Olympic men's gold at Paris 2024.
The hosts took an early lead but in a pulsating match they quickly fell two goals behind before half-time, then mounted a stunning second-half comeback.
However, Thierry Henry's side could not see the job through as Spain substitute Sergio Camello kept calm in the most tense of situations to score twice in the extra period.
Both goals sparked jubilant celebrations among the Spanish, who mobbed Rayo Vallecano forward Camello as they won Olympic gold for the first time since 1992.
The thrilling triumph continued Spain's success, little over a month after they won the men's European Championship, beating England in the final.
They also won the men's under-19 European title last month, while the women's team lifted the World Cup last year.
In contrast, the mood of the hosts was initially one of deflation before a more celebratory tone as the squad received their silver medals.
"It wasn't easy to build this team up, but I'm proud of the work we did," said Henry.
With France unable to clinch victory, Great Britain remained fifth in the Paris 2024 medal table.
Both nations have won 14 gold medals but Team GB have 57 overall which is one more than France.
- Published9 August
Hurt, hope and heartbreak for hosts - how dramatic final panned out
Henry is a national hero for his playing exploits, having helped France win the 1998 World Cup on home soil before going on to become their all-time record goalscorer.
Leading Les Bleus to a first Olympic gold in 40 years would have further immortalised the 46-year-old among his compatriots.
In front of a passionate 48,000 crowd at the Parc des Princes, France made an encouraging start when Enzo Millot's shot squirmed through weak hands from Spain keeper Arnau Tenas.
But Spain's attacking quality quickly clicked into gear to stun the host nation.
Within seven minutes, they had equalised when Barcelona's 21-year-old Fermin Lopez finished off an incisive move with a first-time shot which he scuffed but spun into the bottom corner.
Spain were slick, sharp and got their rewards again to take the lead.
Fermin notched his second when he was more alert than the French defenders, gambling when Guillaume Restes went to gather a left-wing cross and then pouncing when it did not stick to the French keeper's gloves.
When Alex Baena casually and precisely clipped in a free-kick for the third, it looked ominous for France.
However, Henry's side rallied in dramatic fashion and retained belief with their stirring second-half display.
The evolving emotions of the home crowd - from excitement through joy, despair, and anger - had turned to hope.
France pulled a goal back when Maghnes Akliouche diverted in Michael Olise's inswinging free-kick, continuing the surge of momentum and confidence.
With time running out, though, more drama produced a gripping finale.
A melee in the box led to referee Ramon Abatti being told to go to the pitchside monitor and, after a moment of theatrical tension, pointed to the penalty spot with Benat Turrientes deemed to have been holding France substitute Arnaud Kalimuendo.
Crystal Palace striker Jean-Philippe Mateta held his nerve to convert with a composed finish in stoppage time, sparking more wild celebrations among the home fans who collectively caught their breath before extra time started.
Spain, though, looked they still had the capability to carve open France with their slick passing - and that's what happened as Camello turned an incredible game back in their favour with his double strike.
"There were a few minutes during the first half in which we disappeared," added Henry. "And we paid a high price for that."