MADRID (AP) — Cristiano Ronaldo scored a penalty and an overhead kick as Portugal beat Poland 5-1 to guarantee a place in the Nations League quarterfinals on Friday. Scotland got its first win in nine games to keep alive its hopes of staying in the tournament’s top tier. Spain, which had already secured first place in Group A4, beat Denmark 2-1 in Copenhagen, and in the same group Serbia grabbed a late equalizer in Switzerland to condemn the Swiss to relegation into the second tier.

France, Italy, Germany, Spain, and Portugal are all assured one of the eight quarterfinal spots. The games will be held from March 20-23. The eight teams are also guaranteed a spot in Pot 1 for the qualifying draw for the 2026 World Cup.

In Porto, Ronaldo turned in a man-of-the-match performance in a blistering second half. Portugal took its time to overcome a hapless Poland but three goals in the last 10 minutes put the sheen on a commanding victory. Rafael Leão broke the deadlock with a fine header 14 minutes into the second half and then Ronaldo got his 134th international goal from the penalty spot 13 minutes later.

Bruno Fernandes scored a stunning third from almost 30 meters out and three minutes later Ronaldo’s pass gave Pedro Neto the space to lash home a fourth from a tight angle. Ronaldo made it five — and 135 — with a deft overhead kick three minutes from time. Although Dominik Marczuk got a late consolation for the Poles, the result ended its hopes of making the quarterfina.