A last-minute winner for Iceland denied Portugal the chance to meet England in the Euro 2016 last 16, meaning that Cristiano Ronaldo's men will take on Croatia in the next round.
Portugal were forced to save their campaign no less than three times against Hungary, before Ronaldo's double finally assured the draw necessary to progress.
A defeat would have meant early elimination for the Seleccao but a 3-3 draw sees them qualify as one of the best-placed teams in third.
Opposite them in Lens on June 25 will be dangerous Croatia, who gave a warning of their talent with a 2-1 win against Spain. It was the first time since 2004 that La Furia Roja had tasted defeat at a European Championship, with Nikola Kalinic and Ivan Perisic overturning Alvaro Morata's opener.
The game also promises a clash of Clasico rivals for Ivan Rakitic and Ronaldo, respectively of Barcelona and Real Madrid.
The winner will advance into a quarter-final game in Marseille on June 30 against either Switzerland or Poland.