Cristiano Ronaldo at his thrilling best scored twice for Portugal as they reached the last eight with a 2-1 win over the Netherlands, eliminating the Dutch who ended a miserable Euro 2012 campaign without a point.
Man of the match Ronaldo delivered the tournament's best individual display so far with goals in each half, after Rafael van der Vaart had raised Dutch hopes with a wonderful strike in the 11th minute, as they finished runners-up to Germany.
The Germans beat Denmark 2-1 in the other Group B game to finish with nine points ahead of Portugal on six, Denmark with three and the Dutch who had nothing to show for their efforts.
Portugal will now face the Czech Republic on Thursday in Warsaw while the Dutch will go home to lick their wounds.
There was no complaint about the outcome from a Netherlands team that two years ago were World Cup runners-up but this time around deserved their place among the tournament's 'also-rans'.
"I am responsible and therefore failed in this tournament but at this moment I am not thinking about my future," said Netherlands coach Bert van Marwijk as the inquest began.
Like the Dutch, Ronaldo had come in for criticism but the winger's classy touches, electrifying pace and composed finishing proving to be the difference between the two teams.
For the Netherlands, their first exit from a tournament in the group stage since winning the European title in 1988 was all they deserved after three straight defeats.
While the Netherlands, among the pre-tournament favorites, will search for solutions to their massive under-achievement, Portugal have little time for reflection.
The Portuguese will prepare for the knockout phase, having recovered so well from their opening defeat by Germany.
"The win was entirely deserved as was the qualification. The players had quality, hard work, belief and confidence," said Portugal coach Paulo Bento.
"They showed this over the whole course. We proved that you can lose the first game and still qualify," he added.
Finishing second in the toughest group is testament to the impressive progress of Bento's team who significantly have been unchanged throughout the tournament.
The Dutch, in contrast, made three changes as Van Marwijk again searched in vain for the right formula.
His side had to deliver a two-goal victory to have a chance of squeezing into the last eight and Bundesliga top scorer Klaas-Jan Huntelaar got his first start of the tournament.
Van Marwijk's plans looked to have been justified by a confident opening 10 minutes, with smart possession play laying the foundations for Van der Vaart's glorious opener.
Arjen Robben cut in from the right and slipped the ball to the midfielder who superbly curled a left-foot shot inside the post beyond the reach of Rui Patricio for an 11th minute lead.
Yet the goal marked the high tide mark for the men in orange.
Soon after, Ronaldo gave an early reminder of his threat on the counter, powering through before hitting the outside of the post with a low effort - a sign of things to come.
The Netherlands were surprisingly loose with possession and it was from a poor give-away by left-back Jetro Willems that Portugal equalized in the 28th minute.
Joao Pereira threaded a ball to Ronaldo who finished in characteristic style to send the teams in level at the break.
The Dutch tried to get back in front after the interval but it was Portugal who got the reward for their positive approach.
Ronaldo created chances for Fabio Coentrao and Nani but in the 74th minute he decided the outcome in impressive fashion.
Deep in his own half, the winger swung the ball out wide to Nani on the right who raced goalwards before looking up and finding Ronaldo in the area where he steadied himself before firing past Maarten Stekelenburg.
Luck was also against the Dutch when Van der Vaart hit the post with from 25 meters but the sight of Robin Van Persie and Huntelaar shooting wide in the final minutes was more symbolic.
Ronaldo was determined to complete his riposte to hasty critics with a hat-trick and nearly got his wish when in the final minute when he sprinted down the right, screaming for the ball, collected and struck the post with a left-foot shot.
A third goal would have been just reward for an outstanding display but cruel on the thousands of travelling Dutch fans who kindly applauded their team at the conclusion.
Whether many back home believe they deserved that generosity is likely to be fiercely debated in the days and weeks to come.
(Reporting By Simon Evans; editing by Ken Ferris)