Lamine Yamal scored twice as Spain produced a superb display to beat France in a nine-goal thriller and set up a Nations League final with Portugal.
The 17-year-old Barcelona forward, one of the contenders to win the Ballon d'Or for the best player in the world this season, helped his side into 4-0 and 5-1 leads in Stuttgart.
But they were nearly pegged back as France staged a thrilling fightback, scoring three times in the last 11 minutes in a desperate attempt to take the game into extra time.
But Spain held on and they will face Portugal in the final in Munich on Sunday, while France take on Germany in Stuttgart in the third-fourth play-off.
Leading 2-0 through goals from Nico Williams and Mikel Merino, Yamal earned a penalty when he was fouled by Adrien Rabiot, and calmly sent goalkeeper Mike Maignan the wrong way from the spot.
Pedri made it 4-0, collecting a Williams pass and clinically finishing before France pulled a goal back through Kylian Mbappe's penalty following a foul by Tottenham's Pedro Porro.
But Yamal grabbed his second and Spain's fifth with a fine low strike and the game looked over.
However, France substitute Rayan Cherki sparked the revival when, on his international debut, he collected Mbappe's pass, flicked the ball up and volleyed home a wonderful strike from 20 yards out to make it 5-2.
Spanish defender Dani Vivian slid the ball into his own net with six minutes left and then, in the third minute of injury time, Randal Kolo Muani headed in Cherki's cross to make it 5-4, but France could not find an equaliser.