Sweden pipped Spain to top spot in Euro 2020 Group E after a dramatic final set of fixtures.
Luis Enrique's side hammered Slovakia 5-0 in their final group stage match on Wednesday, but having drawn their opening two games that looked as though it wasn't going to be enough to overhaul Sweden, who were 2-0 up against Poland in St Petersburg,
A second half brace from Robert Lewandowski turned the tide and saw Sweden look as though they were going to finish second to Spain on goal difference after a 2-2 draw.
However, Viktor Claeson's 94th minute winner secured top spot for the Swedes.
Spain will now face Croatia in their last-16 clash in Copenhagen next Monday.
In the Spain clash, Newcastle goalkeeper Martin Dubravka went from the sublime to the ridiculous in the first half as he first saved a penalty from Alvaro Morata, before then bizarrely punching the ball into his own net after Pablo Sarabia's shot had hit the bar.
Aymeric Laporte then headed home his first international goal shortly before the break, with Sarabia and Laporte's Manchester City teammate Ferran Torres adding further goals in the second half, and Juraj Kucka putting through his own net to complete the misery.
In St Petersburg, Emil Forsberg gave the Swedes the lead after just 81 seconds of the match, before Lewandowski somehow managed to hit the bar twice from close range.
Forsberg added a second in the second period, before Lewandowski pulled one back with a fine curling effort.
Sweden will now play one of the best third-place finishers, which will be determined later on Wednesday.
Euro 2020 last 16 draw as it stands
Wales vs Denmark, June 26, Amsterdam
Italy vs Austria, June 26, London
Netherlands vs XXX, June 27, Budapest
Belgium vs XXX, June 27, Seville
Croatia vs Spain, June 28, Copenhagen
Sweden vs XXXX, June 28, Bucharest
England vs XXXX, June 29, London
XXX vs XXX, June 29, Glasgow