(CNN) -

Better late than never.

As those in green danced with joy and celebrated the apparent end of Mexico's World Cup curse, those in orange were already planning their flights home.

Mexico, which had failed to win a last-16 match in its previous five attempts, finally appeared to have cracked it.

Giovani Dos Santos' strike, which came in the 48th minute, looked like it had secured a quarterfinal place for only the third time in nation's history -- and the first on foreign soil.

And yet, with the prize within its grasp, Mexico faltered at the last.

With just two minutes of the contest remaining, step forward Wesley Sneijder.

A man for whom nothing had gone right all afternoon. His passing was wayward, his touch was off and the quality with which he has been blessed appeared to have temporarily escaped him.

But when the Netherlands needed the Galatasaray man the most, he delivered.

With 88 minutes on the clock, the ball came out to Sneijder on the edge of the penalty area and he sent an unstoppable right-footed effort into the bottom corner.

Cue the hysteria from the Dutch fans, who had already consigned themselves to an evening of drowning their sorrows and an early flight back to Amsterdam.

In the energy-sapping conditions of Fortaleza, where the temperature pitchside reached over 100, Mexico suddenly wilted.

For the best part of 90 minutes it had negated the attacking threat of the Dutch, seen off Robin van Persie and looked good value for a place in the last eight.

After all, for a team which only qualified for the tournament following a playoff against New Zealand, a place in the quarterfinals would represent a huge success.

Mexico, led by the charismatic and affable Miguel Herrera, have become one of the most difficult sides to beat.

But when it needed its resilience most, it failed.

Instead, Arjen Robben, the man who had tormented Mexico for large periods of the second half, was brought down inside the penalty area by Rafael Marquez.

While the Mexican players protested following Robben's spectacular fall, their anger fell on deaf ears.

"He dived three times, he should have cautioned him the first time," Miguel Herrera, the Mexico coach, told reporters of Robben after the game.

"It seems to me the reason (we lost) was the referee, the man with the whistle. He left us outside the next stage of the World Cup.

"If the referee starts marking fouls that don't exist, you leave the World Cup to circumstances out of your hands. We expect the referee committee to take a look at that and that this gentleman goes home, just like us."

Herrera was still seething after the game as he addressed the press -- and television replays suggested he had a point.

Nevertheless, a penalty was awarded and Klaas-Jan Huntelaar showed remarkable composure to fire low into the corner and break Mexican hearts in the fourth minute of six added on.

"The players showed they had faith and belief until the very end," van Gaal told reporters following the 2-1 victory.

"The humidity was not in our favor, so when you see that until the very last minute we were fresher and fitter than the Mexicans, that is a big compliment to my players.

"Not only did they have belief but physically they prepared so well to play this match. That of course gives us enormous confidence going forward."