Madrid | Denmark and Croatia completed the Nations League quarterfinals lineup after both sides secured draws.
Denmark went 0-0 in Serbia, and Croatia came from behind to share 1-1 with visiting Portugal.
They joined France, Italy, Germany, Spain, Portugal and the Netherlands in the last eight.
The quarterfinals will be held from March 20-23.
In Warsaw, Liverpool fullback Andy Robertson scored an injury time header to give Scotland a 2-1 win over Poland and send the host down into League B. Scotland has a playoff to secure its League A status.
Northern Ireland will step up to League B after topping its group. Northern Ireland let slip a two-goal lead but drew in Luxembourg 2-2. Romania hammered Cyprus 4-1.
San Marino will jump into Group C after beating Lichtenstein 3-1.
Scotland wins again
After going nine matches without a win, Scotland appeared rejuvenated as it condemned a Robert Lewandowski-less Poland to League B.
Scotland took just one point from its first four games in Group A1 but beat Croatia at home on Friday and was 1-0 up after three minutes in Warsaw.
Billy Gilmour's threaded pass found Ben Doak, who rolled the ball to John McGinn to score his second goal in four days.
Scotland hit the woodwork twice in the first half and its inability to open a greater lead almost cost it when Kamil Piatkowski lashed a stunning strike into the top corner of the net to equalize 14 minutes into the second period.
However, Scotland pushed forward for a winner and Robertson headed the decider in the third minute of stoppage time.
Croatia struggle
Croatia needed only a draw to secure qualification but it made the home fans in Split sweat before getting the point it needed against group winner Portugal.
With 32 minutes gone, João Felix brought down a superb 45-yard pass from Vitinha and slipped the ball under the advancing keeper to give the visitors the lead. When Andrej Kramaric hit the post and Josko Gvardiol had a 62nd minute goal ruled out for offside it looked like it might not be Croatia's night.
But Manchester City's Gvardiol got the equalizer just a few minutes later and Croatia held on to take the second quarterfinal spot from Group A1.
Spain beats Switzerland
There was little to play for in Tenerife, where Spain, top of Group A4, took on the already relegated Switzerland.
Coach Luis de la Fuente offered a first start to Barcelona midfielder Marc Casadó and gave debuts to Samu and Aitor Paredes in a much-changed Spain side.
But it was the two Bryans, Gil and Zaragoza, who got the goals that mattered for the European champions.
Pedri's first half penalty was saved but Yeremi Pino converted to put Spain ahead.
Joel Monteiro equalized for Switzerland after 63 minutes but Bryan Gil got Spain back in front five minutes later. Andi Zeqiri equalized again from the penalty spot with five minutes remaining but a stoppage time penalty from Bryan Zaragoza at the other end gave Spain all three points.
Denmark draws in Serbia
In Leskovac, Serbia controlled most of the game against Denmark but could not get the goal it needed to progress from Group A4. Dušan Vlahovic was in fine form for the home side but the Danes held out to take second spot, eight points behind winner Spain but two ahead of the Serbs, for which Strahinja Pavlovic was sent off near the end.
Northern Ireland steps up
Northern Ireland finished on top of Group C3 even though it blew a 2-0 lead in Luxembourg.
Isaac Price opened the scoring after 19 minutes and the Standard Liege midfielder set up Conor Bradley for the second five minutes into the second half. The opener was Northern Ireland's 100th under coach Michael O'Neill.
However, even though the home side scored twice in the last 18 minutes, Northern Ireland ended its campaign with 11 points, two ahead of Bulgaria, which drew at home with Belarus 1-1. Luxembourg finished last.
Romania and Kosovo win
Romania finished on top of Group C2 with a 4-1 win over Cyprus. Daniel Bîrligea put Romania ahead after two minutes and Razvan Marin scored twice before Florinel Coman made it four.
Ioannis Pittas got Cyprus' goal and the Cypriots' Konstantinos Laifis was sent off 13 minutes from time.
Kosovo beat Lithuania 1-0 with an early goal from Muharrem Jashari, who was also sent off on the stroke of halftime.
Kosovo finished second, three points behind Romania, but an asterisk remains over the final placings following the abandonment of Friday's match between the teams in Bucharest.
The Kosovo players alleged they were victims of pro-Serbian chants by the home fans and walked off the field in the final minute. UEFA has opened disciplinary proceedings.
San Marino advances
San Marino will go into Group C at the expense of Gibraltar after beating Lichtenstein 3-1. Gibraltar started the day in pole position with six points but San Marino recovered from being 1-0 down at halftime to score three times in the second half.
Victory also lifted San Marino within reach of a place in the World Cup qualifying playoffs.