PARIS: Cristiano Ronaldo scored twice as Portugal thrashed Poland 5-1 thanks to a rampant second-half display on Friday to reach the Nations League quarter-finals, while already-qualified Spain beat Denmark.
Roberto Martinez's Portugal wrapped up top spot in Group A1 with a game to spare, securing their place in the next round in March.
France, Germany and Italy are also already through to the last eight.
Poland were the better side early on but failed to take their chances in Porto and the home side made them pay, netting four times in the last 20 minutes.
"We couldn't impose ourselves on the game in the first half," said Portugal goalscorer Rafael Leao.
"(Coach) Roberto Martínez's approach in the locker room was important; it was the key to changing the pressure at half-time."
Ronaldo volleyed over from close range shortly before the interval, as Portugal failed to register a shot on target in the first half.
Dominik Marczuk almost broke the deadlock in the 58th minute, but Portugal goalkeeper Diogo Costa produced a brilliant fingertip save to deny him.
The hosts broke from the resulting corner to score less than 60 seconds later, as Leao powered forward before finding Nuno Mendes, then continuing his run to meet the Paris Saint-Germain full-back's cross with a powerful header.
Portugal were awarded a penalty when Diogo Dalot's strike flicked off Jakub Kiwior's hand at point-blank range and was saved by Marcin Bulka.
Ronaldo stepped up to dink home a 'Panenka' spot-kick.
That goal ended any hopes Poland had of staging a comeback and Fernandes added a third for Portugal with 10 minutes left, crashing the ball in off the crossbar from just outside the box.
Pedro Neto also got on the scoresheet, collecting Ronaldo's pass and rifling past Bulka at his near post.
There was still time for Ronaldo to double his tally and move onto 135 international goals, acrobatically volleying home Vitinha's cross from close range in the 87th minute.
Marczuk drilled in a consolation for Poland, but they can no longer qualify for the knock-out stages and will be relegated if they lose to Scotland next week.
In the other match in the group, Scotland gave their hopes of avoiding the drop a massive boost as John McGinn scored a late winner in a 1-0 victory over 10-man Croatia.
Petar Sucic was sent off in the first half, but Croatia almost hung on for the point they needed to qualify with Portugal, only for McGinn to strike in the 86th minute.