Spain will face Brazil in the Olympics Men's football final after penalty and extra-time drama in the semi-finals. La Roja booked their spot in the showpiece event by beating tournament hosts Japan 1-0 on Tuesday (Aug 3).
Marco Asensio scored the only goal of the game in extra time to set up a final meeting with Brazil at the International Yokohama Stadium, with the Selecao having defeated Mexico on penalties.
Japan took Spain all the way to extra time in their last-four clash, sticking to a disciplined defensive shape while looking for opportunities to hit their opponents on the break.
La Roja were denied a penalty after a VAR review, but neither side really looked like breaking the deadlock in the first 90 minutes, and extra time was needed to find a winner.
Asensio ultimately proved to be the matchwinner in the 116th minute, receiving the ball just inside the box before curling a beautiful strike into the far corner of the net.
Japan and Mexico, meanwhile, both still have the chance to pick up the consolation prize of a bronze medal.
The two teams will meet at the Saitama Stadium on Aug 6 in a repeat of their group-stage meeting earlier in the tournament, which ended 2-1 to Japan.