Portugal topped Group D after a narrow win as 10-man Mexico took second place.
Sabrosa scored his eighth goal for Portugal
The Portuguese took an early lead with a well-worked goal, Maniche sidefooting the ball into the roof of the net.
Maniche's goal was set up by Simao Sabrosa, who calmly converted the penalty for Portugal's second after Rafael Marquez's senseless handball.
Jose Fonseca's glancing header reduced Portugal's lead, but Omar Bravo blazed over a second-half penalty, before Mexico's Luis Perez was red-carded.
The win gave Portugal coach Luiz Felipe Scolari a World Cup record of 10 successive victories as a coach.
Four years ago Scolari led Brazil to seven consecutive wins when they lifted the World Cup in South Korea and Japan.
Scolari had rested the five players who had picked up a yellow card in the opening two Group D games, though their absence was hardly felt as the Euro 2004 finalists scored twice in the opening 24 minutes.
Benfica midfielder Simao, who has been long linked with a move to Liverpool, played a key role in both goals.
On six minutes Simao surged into the Mexico box before slipping the ball to Maniche, who scored with an adroit finish that Oswaldo Sanchez had no chance of stopping.
Midway through the half Mexico conceded a second goal, with Marquez inexplicably raising a hand in the box as he rose to try to clear a Portugal corner.
Sanchez dived the right way for Simao's penalty, but the Benfica midfielder's spot-kick was hit with too much precision for the Mexico goalkeeper to get hands on the ball.
Just before the half-hour Mexico reduced the deficit, as Fonseca flicked in a header from a corner by Pavel Pardo.
Portugal endured a nervy end to the first half, Ricardo throwing himself to his left to tip away a Pardo shot.
Bravo had scored twice in Mexico's 3-1 win over Iran
Soon afterwards Ricardo looked less impressive in trying to gather a cross from the right, though neither Fonseca or Marquez was able to stab the rebound home in the enusing melee.
Portugal endured an equally uncomfortable spell after the restart as Mexico continued to press for the equaliser.
Just before the hour Mexico should have equalised when they were awarded a penalty after Miguel's handball, only for Bravo to blaze the ball embarrassingly over the bar.
Soon after Mexico appealed for a second penalty after a Miguel tackle on Perez.
But referee Lubos Michel decided Perez had dived, sending off the Mexican player for his second yellow card.
Scolari quickly withdrew Miguel, replacing him with Chelsea full-back Paulo Ferreira, who might have conceded another penalty with an ill-judged tackle on Bravo.
Even with 10 men Mexico continued to trouble Portugal, though in the closing stages Scolari's side finished strongly, and Sanchez did well to beat away a Maniche shot.
Portugal will meet Holland on Sunday in Nuremberg, while Mexico must face Argentina on Saturday in Leipzig.
Portugal: Ricardo, Miguel (Paulo Ferreira 61), Ricardo Carvalho, Meira, Caneira, Petit, Maniche, Tiago, Figo (Boa Morte 80), Simao, Postiga (Nuno Gomes 69).
Subs Not Used: Costinha, Deco, Nuno Valente, Paulo Santos, Pauleta, Quim, Ricardo Costa, Ronaldo, Viana.
Booked: Miguel, Maniche, Boa Morte, Nuno Gomes.
Goals: Maniche 6, Simao 24 pen.
Mexico: Sanchez, Pineda (Castro 69), Marquez, Osorio, Salcido, Rodriguez (Zinha 45), Pardo, Perez, Mendez (Franco 80), Fonseca, Bravo.
Subs Not Used: Arellano, Borgetti, Corona, Garcia, Guardado, Morales, Ochoa, Suarez, Torrado.
Sent Off: Perez (61).
Booked: Rodriguez, Perez, Marquez, Zinha.
Goals: Fonseca 29.
Ref: Lubos Michel (Slovakia).
Fifa man of the match: Jose Fonseca
Portugal have won Group D by emerging victorious in each of their three matches, a feat they achieved once before (1966). The goal by Jose Fonseca was the first conceded by Portugal in this tournament.
The Portuguese converted their sixth penalty in a World Cup match and maintained their perfect record in this respect. Portugal and Spain are the only nations that have scored from the penalty spot at the 2006 World Cup. In fact, the two nations have converted twice each. This match marks the 14th time in 682 World Cup matches that both sides have been awarded a penalty in regulation. It is also the 24th time there have been two penalties in the same match, excluding shootouts.
The red card by Luis Perez was Mexico's sixth in World Cup history and meant that Mexico have now had at least one player sent off in their last four World Cup participations. The only other nation to have had dismissals in four successive World Cups is Cameroon (1990-2002).
Trivia stats source: Infostrada Sports