Cristiano Ronaldo became the first man to score in four European championships as Portugal scraped through to the knockout stages of Euro 2016, along with Group F winners Hungary and second-placed Iceland.
Ronaldo, who also set a tournament record of 17 appearances, scored twice in a pulsating 3-3 draw with Hungary on Wednesday.
The Portuguese came from behind three times as Ronaldo finally rediscovered his touch to help his side into the last 16, where they will meet Croatia in Lens on Saturday.
The Real Madrid star scored both his goals in the second half after Zoltan Gera’s early strike was cancelled out by Nani just before the break.
Hungary captain Balazs Dzsudzsak had twice put his side ahead before Ronaldo burst into life with a double strike.
Hungary will play the Group E runners-up, which will be decided later on Wednesday between Belgium, Sweden and Ireland.
Tournament debutants Iceland also qualified for the knockout stages with a last-gasp 2-1 win against Austria to set up a last 16 meeting with England on Monday.
After taking an early lead through Jon Dadi Bodvarsson, the tiny island country of barely 330,000 people was forced to defend for most of the second half and conceded a goal to Alessandro Schoepf in the 60th minute.
The Austrians dominated the final stages at the Stade de France but conceded a breakaway goal to substitute Arnor Ingvi Traustason in the fourth minute of stoppage time.
Austria were eliminated after finishing in last place in Group F on one point.
The results also mean Albania, who had stayed in France since their last game on Sunday to find out whether they would qualify, will be heading home after all.
Albania finished Group A in third position with three points but a minus-2 goal difference, and fewer goals scored than Turkey (Group D) who also have three points and minus-2.
Turkey can still advance depending on results for Sweden and Ireland in Group E later.
RipplesNigeria …without borders, without fears
Latest posts by Ripples Nigeria (see all)
- Governors promise swift response to coronavirus, encourage Nigerians to self-quarantine - February 28, 2020
- NSE: Bank stocks top trade as negative sentiments persist - February 28, 2020
- Nigerian footballer contracts coronavirus in Italy - February 28, 2020