Portugal beat the Netherlands 2-1 on Sunday to set up a Euro 2012 quarter-final with the Czech Republic and condemn the Dutch to a first group-stage European Championship exit since 1980.
Needing to win by two clear goals to stand any hope of progressing, Holland took an early lead through Rafael van der Vaart but were undone by goals in each half from man of the match Cristiano Ronaldo.
From a Dutch perspective, the final score was rendered immaterial as Denmark's 2-1 loss to Germany in the other Group B match meant they would not have qualified for the last eight even in case of victory.
Portugal, for whom Ronaldo belatedly reproduced his Real Madrid form at this tournament, will compete for a semi-final place against the Czechs in Warsaw on Thursday.
Runners-up at the World Cup two years ago and top scorers in qualifying, the Netherlands leave Ukraine with their tails between their legs after three consecutive defeats.
Mindful of the pressing need for goals, Holland coach Bert van Marwijk handed starts to both Klaas-Jan Huntelaar and van der Vaart, who replaced captain Mark van Bommel and inherited the captain's armband from him.
Van der Vaart needed less than 11 minutes to vindicate his manager's decision, collecting a pass from Arjen Robben and shaping a delightful 25-yard shot inside the left-hand post to put Holland ahead.
However, if the Dutch thought they were in for a comfortable evening, Portugal quickly had them on their toes with a flurry of chances sparked by Ronaldo drifting inside and brushing the post with a low strike.
Dutch goalkeeper Maarten Stekelenburg was allowed to shine on his 50th appearance, thwarting Helder Postiga following an errant back-pass by Gregory van der Wiel and then showing sharp reflexes to box away a Ronaldo header.
Holland failed to heed the warnings though, and in the 28th minute Ronaldo levelled, powering onto Joao Pereira's incisive, stabbed pass and clipping the ball past Stekelenburg from close range.
Strangely, scoring the opening goal seemed to have inhibited the Dutch, and they were cowed even further by Ronaldo's equaliser.
So often scorned for his international displays, Ronaldo was a man transformed, and after working Stekelenburg with an audacious dipping shot from 35 yards, he crashed a header narrowly wide from a corner.
Van Marwijk gambled in the second half, throwing on winger Ibrahim Afellay for left-back Jetro Willems, but still Portugal came, Nani spurning a good chance by firing at Stekelenburg after Ronaldo had rolled the ball across goal.
The Madrid man was not so forgiving when Nani returned the favour in the 74th minute, checking inside sharply to send van der Wiel sprawling and then calmly beating Stekelenburg at his near post.
Van der Vaart hit the post with a right-foot curler, but it was the only bright moment in what was a desperate second period for the Dutch, who saw Ronaldo wobble an upright in the final minute.