Brazil reached back-to-back menâ€™s Olympic football finals following a penalty shootout victory over Mexico.
The defending champions won 4-1 on penalties after a goalless 120 minutes in Kashima.
Brazil goalkeeper Santos saved from Eduardo Aguirre in the shootout before Johan Vasquez hit the post with Mexicoâ€™s second penalty.
They will play Spain in Saturdayâ€™s gold medal match.
Dani Alves, Arsenalâ€™s Gabriel Martinelli, Bruno Guimaraes and Reinier all scored their spot-kicks for Brazil.
It looked like the second semi-final was heading for penalties until Marco Asensio scored in the 115th minute in Saitama.
The Real Madrid winger came off the bench to score the winning goal with a superb curling strike from inside the box to send Spain to a first Olympic final since they finished runners-up at the 2000 Games in Sydney.