(CNN) -- Carlos Tevez scored twice as Argentina beat Mexico 3-1 in Johannesburg, South Africa, to set up a meeting with Germany in the quarterfinals of the World Cup.
The Manchester City striker opened the scoring after 25 minutes in controversial fashion when television replays, which were relayed on the giant screens in the stadium, showed he was offside when he received the ball from Lionel Messi and headed into the net.
Despite protests from the Mexican players, the goal was allowed to stand. Argentina doubled its lead when Gonzalo Higuain rounded goalkeeper Oscar Perez to score his fourth goal of the tournament.
Tevez made certain of the victory with a stunning long-range strike into the top corner early in the second half.
Javier Hernandez pulled a goal back for Mexico with a powerful left-footed drive after 70 minutes, but it proved to be little more than a consolation for the Mexicans as Argentina easily claimed the victory.
Manager Diego Maradona's men almost scored a fourth goal when Perez had to dive to his right in stoppage-time to tip Messi's shot over the bar.
Mexico, who has now gone out in the last 16 at five World Cups in a row, may feel the result could have been different without the error from the officials.
After seeing the error on the big screens, Mexican players surrounded the referee and his assistant but the officials decided not to revoke the goal.
The controversy marked the second major officiating mistake of the day at the World Cup after England midfielder Frank Lampard was denied a goal against Germany, even though his shot struck the bar and bounced some two feet over the line.
Germany, who was leading 2-1 at the time of Lampard's strike, went on to win 4-1.
The Germany-Argentina clash will take place in Cape Town, South Africa, on Saturday, July 3.