WEMBLEY, England — Oribe Peralta scored with a swerving long-range strike, then set up another goal with a stunning back-heel to help Mexico beat Japan 3-1 on Tuesday and secure a spot in the final of the men's Olympic soccer tournament.

Mexico will play Saturday against Brazil, which beat South Korea 3-0 in the other semifinal.

"We are guaranteed a silver, but we want a gold," Mexico coach Fernando Luis Tena said. "Mexico is a football nation. They must be partying tonight."

Mexico's previous best showing at the Olympics was at the 1968 Mexico City Games, when the team was beaten in the bronze-medal match 2-0 by Japan, also that nation's best finish.

Yuki Otsu opened the scoring at the 12-minute mark for Japan. The forward sent a swerving shot into the roof of the net from outside the penalty area after several quick passes carved out a sliver of space.

Marco Fabian headed in a corner for Mexico before halftime to equalize.

Peralta scored at the 65-minute mark after winning the ball off of Japanese defender Takahiro Ohgihara, who lingered with it too long after keeper Shuichi Gonda had rolled it to him. Peralta ran with the ball briefly, then shot high and to the left of Gonda to give Mexico the lead.

"Beautiful," was the way Peralta described his shot from outside the penalty area in front of 80,000 fans at Wembley.

"I have never scored a goal that went so close to the top corner," he said. "That goal represented everything we tried to do today because I fought for the ball, I got it back and I shot with all my strength."

Deep into extra time, Javier Cortes cut into the box from the right wing, took the back-heel from Peralta, beat a defender, then sent the ball through the legs of Gonda to cap the victory.

"We had a good start, but then stopped moving," Japan coach Takashi Sekizuka said. "Everyone is very disappointed. But we need to get over our emotion and prepare for the next game."

Japan plays South Korea on Friday for the bronze medal.

Also on HuffPost:

Loading Slideshow...
  • Yuki Otsu

    Japan's forward Yuki Otsu jumps for the ball during their London 2012 Olympic Games men's semifinal football match against Mexico, at Wembley Stadium in London, on August 7, 2012.

  • Oribe Peralta

    Mexico's forward Oribe Peralta (9) celebrates with teammates after scoring against Japan during their London 2012 Olympic Games men's semifinal football match, at Wembley Stadium in London, on August 7, 2012.

  • Oribe Peralta

    Mexico's forward Oribe Peralta (C) celebrates with teammates after scoring against Japan during their London 2012 Olympic Games men's semifinal football match, at Wembley Stadium in London, on August 7, 2012.

  • Oribe Peralta

    Mexico's forward Oribe Peralta (R) celebrates next to Mexico's defender Israel Jimenez (2ndR) and others teammates his goal against Japan, as Japan's midfielder Hiroshi Kiyotake (background) reacts, during the men's football semifinal match between Mexico and Japan at the Wembley Stadium in London, on August 7, 2012 during the London 2012 Olympic Games.

  • Yuki Otsu

    Yuki Otsu of Japan in action during the Men's Football Semi Final match between Mexico and Japan, on Day 11 of the London 2012 Olympic Games at Wembley Stadium on August 7, 2012 in London, England.

  • Hiroki Sakai

    Japan's defender Hiroki Sakai (L) heads the ball in front of his goal as Mexico's defender Hiram Mier looks on during their 2012 London Olympics men's football at the Wembley stadium in London August 7, 2012.

  • Oribe Peralta

    Mexico's forward Oribe Peralta (2-R) celebrates with teammates after scoring against Japan during their London 2012 Olympic Games men's semifinal football match, at Wembley Stadium in London, on August 7, 2012.

  • Mexico

    Mexico's Marco Fabian, third right. heads the ball to score as Japan's Shuichi Gonda (1) can't make a save during their men's soccer semifinal match at Wembley Stadium at the 2012 Summer Olympics, Tuesday, Aug. 7, 2012, in London.

  • Jorge Enriquez

    Mexico's Jorge Enriquez, left, challenges for the ball with Japan's Hotaru Yamaguchi, right, during their men's soccer semifinal match at Wembley Stadium at the 2012 Summer Olympics, Tuesday, Aug. 7, 2012, in London.

  • Marco Fabian

    Mexico's Marco Fabian, right, vies for the ball with Japan's Hiroki Sakai during the men's soccer semifinal match between Japan and Mexico at Wembley Stadium, at the 2012 Summer Olympics, Tuesday, Aug. 7, 2012, in London.

  • Oribe Peralta

    Mexico's Oribe Peralta scores during the men's soccer semifinal match between Japan and Mexico at the Wembley stadium, at the 2012 London Summer Olympics, Tuesday, Aug. 7, 2012, in London.

  • Jorge Enriquez

    Mexico's Jorge Enriquez, right, heads the ball next to Japan's Kensuke Nagai, center, and Japan's Maya Yoshida, right, during their men's soccer semifinal match between Japan and Mexico at Wembley Stadium at the 2012 Summer Olympics, Tuesday, Aug. 7, 2012, in London.

  • Yuki Otsu

    Japan's Yuki Otsu, left, celebrates his goal with teammates Takahiro Ohgihara, center, and Maya Yoshida, right, during their men's soccer semifinal match against Mexico at Wembley Stadium at the 2012 Summer Olympics, Tuesday, Aug. 7, 2012, in London.

  • Yuki Otsu

    Japan's Yuki Otsu scores during the men's soccer semifinal match between Japan and Mexico at Wembley Stadium, at the 2012 Summer Olympics, Tuesday, Aug. 7, 2012, in London.

  • Marco Fabian

    Mexico's Marco Fabian, left, celebrates with his teammate Diego Reyes after scoring during the men's soccer semifinal match between Japan and Mexico at Wembley Stadium, at the 2012 London Summer Olympics, Tuesday, Aug. 7, 2012.

  • Hiroshi Kiyotake

    Japan's Hiroshi Kiyotake, center, vies for the ball with Mexico's Darvin Chavez, left, and Jorge Enriquez, right, during their semifinal soccer match at Wembley Stadium at the 2012 Summer Olympics, London, Tuesday, Aug. 7, 2012.

  • Hiroki Sakai

    Japan's defender Hiroki Sakai (L) and Mexico's forward Raul Jimenez jump for the ball during their London 2012 Olympic Games men's semifinal football match, at Wembley Stadium in London, on August 7, 2012.

  • Javier Cortes

    Mexico's midfielder Javier Cortes celebrates after scoring the team's third goal against Japan during their London 2012 Olympic Games men's semifinal football match, at Wembley Stadium in London, on August 7, 2012.

  • Javier Cortes

    Mexico's midfielder Javier Cortes (R) celebrates after scoring the team's third goal against Japan during their London 2012 Olympic Games men's semifinal football match, at Wembley Stadium in London, on August 7, 2012.