Portugal qualified as group winners, but they were pushed all the way by a vibrant Mexico side who were reduced to ten men midway through the second half.
All the goals came in a thrilling first half, although Mexico had a wonderful opportunity to secure at least a point from the game when they were awarded a penalty early in the second half, but Bravo skied his spot-kick.
With Portugal coach Scolari vowing not to use any of the five players he had on a booking on the bench, Portugal had an unfamiliar look. There was even a place for the little-used striker Helder Postiga who came in for Pauletta up front.
Mexico made a bright start to the game and Fonseca came close when he tested Ricardo in the Portugal goal with a low drive in the opening minutes.
However, Portugal took the lead with their first attack of the game. Simao ran unchallenged down the left flank and his cross found Maniche who finished with a fine first time effort.
Aware that they could still be knocked out of the competition if results went against them, Mexico were soon back on the attack, and Bravo came close with a flying volley.
Mexico’s cause was not helped by an inexplicable lapse in concentration by Mexico skipper Marquez. He rose to head the ball but lifted his arm in the challenge and the ball glanced off his fingertips. The alert referee spotted the infringement, pointed to the spot, and Simao slammed home the penalty to double Portugal’s lead.
Tiago almost added a third following a good break from Postiga, but the Lyon midfielder lofted his shot just over the bar. It was all-one way traffic at this point, but Mexico almost reduced the arrears when the ball fell to Bravo whose volley was cleared off the line by Ricardo.
From the resulting corner, Jose Fonseca came good on his recall with a goal that revived Mexico’s hope. He rose unchallenged to glance a near post header past Ricardo and Mexico were back in the game.
Shortly before half-tine Pardo drew a fine save from Ricardo, and as Portugal struggled to clear the ensuing corner, Mexico again came close to an equaliser.
After starting the game displaying poise and purpose, Portugal’s standards had slipped markedly in the run up to half-time, and after the break, there was little sign that Luiz Scolari’s team were capable of turning things around.
Ten minutes into the second half and following more good play from Perez, Miguel handled the ball and the referee pointed to the spot. However, Bravo opted for power rather than placement and his effort sails into the crowd
Mexico’s hopes were hit on the hour mark when Perez was given his marching orders when he received a second yellow card for diving. Despite being reduced to ten men, Mexico should have gone ahead when Bravo was put through, but the striker merely succeeded in emulating his earlier penalty miss and his shot flew over the bar.
Meanwhile, on a rare break forward, Portugal substitute Nuno Gomes almost made an immediate impact, but he fired over from eight yards.
Mexico, who had been awarded one penalty, had a player sent off for diving in the hope of securing a second, were denied a blatant spot-kick when substitute Ferreira scythed down Bravo. However, the referee, perhaps unsighted, awarded a corner instead.
The match ended in chaotic fashion with all semblance of tactics thrown out of the window as both sides pressed for the goal that neither of them actually needed.
The win ensures Portugal top the group, but their laboured performance against a spritely Mexico side does not inspire a huge amount of confidence for the challenges that lay ahead.
Mexico also go through, and if they can produce a repeat of their second half display they may fancy their chances of causing an upset in the knockout stages.
Portugal: Pereira, Miguel, Caneira, Carvalho, Meira, Petit, Figo, Maniche, Tiago, Postiga, Simao.
Subs used: Ferreira 61 (for Miguel), Nuno Gomes 69 (for Postiga), Boa Morte 90 (for Luis Figo).
Bookings: Miguel 26, Boa Morte 88
Mexico: Sanchez, Mendez, Marquez, Pineda, Osorio, Salcido, Rodriguez, Pardo, Perez, Bravo, Fonseca.
Subs used: Zinha 45 (for Rodriguez), Castro 69 (for Pineda), Franco 80 (for Mendez).
Bookings: Rodriguez 22, Perez 27, Marquez 65, Zinha 87
Red card: Perez 61
Missed penalty: Bravo 58
Referee: Lubos Michel (Slovakia)
Portugal: Maniche 6, Simao (pen) 24
Mexico: Fonseca 29