Cristiano Ronaldo's brace fired Portugal into the quarter-finals of Euro 2012 and sent the Netherlands home without a single point.
The Dutch started the brighter with Arjen Robben looking lively down the right flank, and they took a deserved lead on 11 minutes.
Rafael Van Der Vaart broke the deadlock with a contender for goal of the tournament rocketing past a helpless Rui Patricio in the Portuguese goal to send the Oranje fans crazy.
Knowing only a win would do, the Netherlands pressed for a second, but in doing so conceded possession and were repeatedly caught on the break by Portugal who spurned a number of chances to equalise.
The leveller inevitably came on 27 minutes when Ronaldo cooly slotted home when one-on-one with Maarten Stekelenburg.
After the restart it was still end to end stuff but with the game running away Netherlands seemed short on ideas.
Any hope of qualification ended when Ronaldo scored his second with 17 minutes to play.
Victory seals second place and a quarter-final clash with Group A winners Czech Republic.