After 114 minutes of frustration, Spain finally broke through the Japanese defense and booked a place in the gold medal match against Brazil with a 1-0 win in the semifinal.
Marco Asensio played hero on Tuesday, as the substitute's fantastic curling effort late into extra time broke the deadlock and proved to be the winner against host nation Japan.
The goal was deserved for a Spain team that created plenty of chances but were unable to beat Japanese goalkeeper Kosei Tani.
This time, it was Asensio linking up with captain Mikel Oyarzabal to free himself up in the box and deposit a tidy finish into the bottom left.
Asensio, who came on in the 84th minute for a fatigued Pedri, got involved right at his introduction, providing Spain with a spark on the right side and ultimately contributing the winner.
SEE MORE: Asensio's extra time goal sends Spain to gold medal match
While the first 90 minutes were without goals, that's not to say that they were without chances.
The best chance of the first half fell to Spain seven minutes from halftime. Rafa Mir was played through by Mikel Merino, but Tani was equal to the chance and saved comfortably.
It appeared Spain were about to take the lead from the spot ten minutes into the second half when Maya Yoshida and Merino came together in the box, but a brief VAR review overturned the penalty decision.
The match opened up in the final half hour of regulation, with both sides creating chances but neither able to grab the crucial opening goal.
With just minutes to go in the second half, Takefusa Kubo got free down the left and stormed into the penalty area, but his left-footed effort was saved by Unai Simon.
Minutes later, a loose ball fell to the boot of Martin Zubimendi in the box, but Tani again was there to parry the shot away.
Spain's win means it will play for gold against Brazil, who escaped Mexico on penalties earlier Tuesday.
For Japan, the hunt for a medal is not yet over. They will play for bronze against Mexico on Friday.
SEE MORE: Brazil to play for gold after solving Mexico in penalties