WEMBLEY, England -- Mexico is celebrating its first Olympic gold medal in men's soccer, and Brazil is wondering if it will ever be able to add the title to its long list of triumphs.

Oribe Peralta scored only 29 seconds into the Olympic final at Wembley Stadium and added another goal in the second half to help Mexico upset Brazil 2-1 Saturday.

Peralta took advantage of a mistake by the Brazilian defense in one of the game's first plays and sent a low right-footed shot inside the near post.

The striker added the second with a firm header off a free kick in the 75th. Hulk scored for Brazil in injury time, but Oscar missed a header in the final seconds to waste the last chance for a comeback in front of 86,162 fans.

"Mexico will be celebrating on the streets," coach Luis Fernando Tena said. "It is a great honor for a coach to see his players singing the national anthem with gold medals around their necks. It's a very important moment for Mexican football. It's a great moment for us."

Brazil was also trying to win its first Olympic gold, which is the only significant trophy the five-time World Cup champions haven't won in soccer. The Brazilians established the London Games as the team's priority this year and arrived as the big favorite after bringing most of its top players for the competition. Many will also be on the team that will try to give Brazil the title at the 2014 World Cup at home.

"We are all sad. We know it was probably our only chance to win a gold medal," said Neymar, touted as the future of Brazilian soccer. "Four years from now most of us likely won't be here again so this was our last Olympics. It was our last chance to win the gold."

As Mexican players jumped up and down at midfield in celebration, the Brazilians dropped to the ground in despair. Neymar was one of them, sitting stoned-faced. Real Madrid left back Marcelo dropped his head and cried as his teammates came to console him.

"Yet again we came close but didn't quite get it," Brazil coach Mano Menezes said. "Defeat is part of the maturing process. This group will continue on this path and get ready for 2014."

Peralta gave Mexico the early lead after right back Rafael tried to make a backward pass. Mexico midfielder Javier Aquino intercepted the ball, sending it forward to Peralta just outside the area. With no defenders near him, he calmly sent his shot into the left corner.

FIFA said Peralta's goal was the fastest since the 1976 Montreal Olympics, when football's governing body began keeping records of the competition. The fastest goal in a senior competition was scored by Turkey's Hakan Sukur 11 seconds into a match at the 2002 World Cup in South Korea and Japan.

FIFA said the fastest goal in all competitions came from Brazil's Fabinho, who scored in nine seconds in the 2007 Under-17 World Cup in South Korea.

The Mexicans also had a goal by Peralta disallowed for offside in the 69th, and Fabian missed the open net with his header off a corner in the 72nd.

Brazil appeared to be shaken by the early goal and struggled to create scoring opportunities. Neymar started playing better in the second half and helped Brazil push forward, but struggled to get his efforts on target.

Hulk scored the team's only goal with a low shot from inside the area in the first minute of injury time.