Del Piero drags Italy through
It had looked like Italy would only progress through by the narrowest of margins - with only goal-difference putting them into the knock out stages with seven minutes left on the clock.
But Del Piero, who has warmed the bench thus far for Italy, was finally brought on - to the delight of the impatient Italian fans - and proved his worth by converting with a close range header, that levelled Jared Borgetti's brilliant first-half opener.
You can excuse the Italians for looking en-masse to the linesman as the ball hit the back of the net - for both Vincenzo Montella and Filippo Inzaghi had seen goals ruled out for offside, but on this occasion the flag stayed down and they could celebrate.
Mexico, consummately professional throughout, looked solid at the back and top the group deservedly.
The first period had seen Italy dominate the early play, but concede to a confident and organised Mexico, after missing a hatful of golden chances.
The Azzurri have not had the best luck with officials in this World Cup, and had yet another goal ruled out by a debatable offside decision by the linesman.
Inzaghi looked to be well onside when the ball was played through, and he lifted the ball over the onrushing goalkeeper for what he thought was the opener before noticing the flag had been raised.
It could be argued that Vieri, centrally placed, was interfering with play, but the watching Italian 'tifosi' were cursing their luck again.
The referee Carlos Simon was acting on his linesman's advice and it proved to be his only erroneous decision of the half.
The Brazilian official showed that he would not tolerate diving, booking Christian Panucci and Francesco Totti for 'simulation,' with the latter a wonderful spot under pressure.
Gianluigi Buffon had been forced to dash out to close down Borgetti, but for the opening half an hour it was virtually all Italy, with Vieri shooting narrowly over from range and Totti missing a glorious opportunity to give his side the lead.
The Roma captain escaped down the left and was picked out by Inzaghi, but for once the brilliant playmaker could not find the target, and curled his effort just past the post when he should have scored.
Captain Rafael Marquez was absolutely brilliant at the heart of the three man defence, and he made two important challenges to deny Inzaghi opportunities.
But the defender could only watch as Christian Vieri and Totti combined for the former to shoot at the goalkeeper.
Totti then almost atoned for his miss with a lovely driven free-kick but after beating the wall and the keeper his effort also beat the far post.
But against the run of play it was Mexico that took the lead after 11 minutes before the interval.
Cuauhtemoc Blanco chipped the ball forward to Borgetti who deftly flicked a reverse header into the far post leaving Buffon a spectator.
Italy went back into attack and Zambrotta stretched to reach a Vieri knockdown, but could only slice wide.
Then at the other end it took a superb Cannavaro challenge to prevent Borgetti a shooting chance after Gerardo Torrado cantered through from deep in midfield.
A thrilling second half saw Italy continually frustrated by the competent Mexicans.
With Totti misfiring, and star strike Christian Vieri frustrated by a lack of service, the Azzurri's supporting cast were being asked major questions - and not coming up with any convincing answers.
Filippo Inzaghi had been given the nod as Trapattoni moved back to his familiar 3-5-2, but the Milan man showed just why he has never become a favourite with the fans with a patchy performance.
Just three minutes into the second half Inzaghi found a free run down the right, but over-ran the ball and was tackled.
A minute later Totti finally found a great through ball but 'Superpippo' was incapable of controlling with his first touch - allowing goalkeeper Oscar Perez the time to get out and tip away from his feet.
Mexico had looked dangerous on the counter-attack, and Jersus Arellano was desperately unlucky not to score when he beat two men inside the area and played a one-two with Blanco but found his shot just cut out by an alert Buffon with Vieri poised to clear.
It appeared Italy had levelled when Montella, on for Inzaghi, ran free and lobbed the keeper- 63 minutes into the game - but was rightly adjudged offside, a better decision than the one that had robbed Inzaghi of a first half goal.
As things became tense for the Italians Totti again unlocked the defence, but Vieri is not as strong on his right foot and his shinned effort on the sprint was well save by Perez.
When Montella missed a gilt-edged opportunity to smash home from just seven yards out, Trapattoni must have thought it was not his day - but finally decided the time was right to throw on Del Piero.
Del Piero - much maligned for his misses in the final of Euro 2000 - sparked the Italians, and when the former golden boy of Italian football gleefully headed home in the 85th minute - the Italians celebrated like they had won the cup.
The farcical final few minutes saw the Mexicans pass around almost uncontested in their own half as news filtered through that both sides would qualify with the draw.
Mexico are worthy of their place, but Italy have some big decisions to make if they are to progress any further than the last 16 - decisions that will certainly involve Del Piero.
Mexico: Oscar Perez 8, Salvador Carmona 7, Rafael Marquez 9* , Manuel Vidrio 7, Ramon Morales 7 (Garcia 6), Braulio Luna 6, Gerardo Torrado 7 , Joahan Rodriguez 6 (Cabellero 6), Jersus Arellano 8, Jared Borgetti 9 (Palencia 6), Cuauhtemoc Blanco 7.
Italy: Gianluigi Buffon 7, Paolo Maldini 5, Alessandro Nesta 6, Fabio Cannavaro 7, Christian Panucci 5 (Francesco Coco 7), Cristiano Zanetti 6, Damiano Tommasi 6, Gianluca Zambrotta 6, Franceso Totti 6 (Del Piero 8*), Filippo Inzaghi 5 (Montella 6), Christian Vieri 6.
Click here for our extensive match stats from the game
For rection from the Italian camp click here
For reaction from the Mexican camp click here
Click here for our new feature: Best of the Day