Mexico will play Brazil in the men's Olympic football final after coming from behind to beat Japan 3-1.
The Asian side took the lead at Wembley through a stunning long-range strike from Yuki Otsu.
But Marco Fabian headed Mexico level before the break as Japan conceded for the first time in the Games.
And Oribe Peralta struck from 20 yards after the break before Javier Cortes wrapped up victory in injury time.
Japan, whose world champion women's team are in the final of their competition, can still equal the bronze medal they won in Mexico in 1968, but their semi-final opponents are now in unknown territory in the Olympics after coming fourth in 1992.
Japan, who beat Egypt 3-0 to reach the last four, went in front after 11 minutes when Otsu rounded off a patient and precise build-up with a thunderous finish, collecting a pass from Keigo Higashi and taking one touch before smashing the ball beyond Jose Corona from outside the box.
Mexico, who saw off Senegal in extra-time to win their quarter-final, should perhaps have levelled when the ball broke invitingly to Tottenham's Giovani dos Santos but he snatched at his shot, which drifted wide from 10 yards.
However, Luis Fernando Tena's team were on level terms on the half-hour mark when Fabian headed home from six yards after Japan failed to defend a corner.
Hotaru Yamaguchi had a shot blocked and Kensuke Nagai missed the target for Japan but as the match wore on the tempo dropped and chances were at a premium.
It took Peralta's stunning strike to break the deadlock, although Takahiro Ohgiharan must shoulder some of the blame after giving the ball away cheaply.
The 20-year-old collected the ball from keeper Shuichi Gonda but turned blindly and was dispossessed by Peralta, who still had a lot to do but took his opportunity brilliantly.
The result was put beyond doubt on the stroke of full-time when substitute Cortes collected a backheel from Peralta and burst into the box before shooting past Gonda.