Mexico won the Olympic men's soccer title for the first time, stunning favorite Brazil 2-1 in front of 86,162 fans at Wembley Stadium on Saturday.

Oribe Peralta put Mexico ahead after 28 seconds and added the team's second in the 75th minute with a header, before Hulk replied for Brazil in stoppage time.

With seconds remaining, Oscar had a golden chance to equalize but headed wide.

The result leaves five-times World Cup winner Brazil still searching for the one major title to elude it after trying for 60 years. It was Brazil's third defeat in an Olympic final after previous losses in 1984 and 1988.

Peralta fired Mexico ahead in the first minute (the fastest goal ever scored in the final of an Olympic soccer tournament) after a defensive mix-up between Sandro and Rafael, then had a goal disallowed before his powerful header from a free kick effectively sealed Mexico's victory.