For most of Tuesday evening, Japan’s U-24 men’s soccer team frustrated Spain with patient defending and occasional threatening runs that looked capable of upsetting one of the tournament’s strongest teams and giving the host nation its best-ever Olympic showing.

But after 115 minutes it was Spain whose patience ran out, with Real Madrid striker Marco Asensio curling in a dagger from the right side of the box to see the European side advance to Saturday’s gold-medal final against Brazil with a 1-0 win.

The result will see Hajime Moriyasu’s side face Brazil on Friday for the bronze medal — its second time playing in the third-place match in the last three Olympic tournaments.