Updated at 9.25 pm
Portugal 2 (Maniche 6, Simao Sabrosa, penalty kick, 24) Mexico 1 (Jose Fonseca, 29)
Hardly anything went right for Mexico against Portugal but they qualified.
GELSENKIRCHEN: Portugal beat Mexico 2-1 in a match decided by two penalties on Wednesday to go into the second round of the World Cup with full points from Group D.
The Portuguese seemed to be cruising when they went 2-0 up thanks to a sixth minute goal by Maniche and a Simao Sabrosa penalty in the 24th.
But Mexico pulled one back in the 29th minute through Jose Fonseca and missed a great chance to equalise when Omar Bravo blazed the ball over the bar from a penalty in the 57th.
Four minutes later Luis Perez, booked in the first half, tried to get Mexico a second penalty but was shown a red card for diving.
Portugal will play the runners-up in Group C, either Netherlands or Argentina, in Nuremberg on Sunday.
Fonseca Jose (Mexico) was named Man of the Match.
Teams
Portugal
Ricardo, Marco Caneira, Fernando Meira, Luis Figo (capt), Petit, Simao Sabrosa, Miguel, Ricardo Carvalho, Maniche, Tiago, Helder Postiga
Coach: Luiz Felipe Scolari
Mexico
Oswaldo Sanchez, Carlos Salcido, Rafael Marquez (capt), Ricardo Osorio, Pavel Pardo, Gonzalo Pineda, Mario Mendez, Jose Fonseca, Omar Bravo, Francisco Rodriguez, Luis Perez
Coach: Ricardo Lavolpe
Referee: Michel Lubos (Slovakia)