Manchester City defender Ruben Dias scored twice, including a last-minute winner, as Portugal beat Croatia in a Nations League thriller.
Following Marko Rog’s red card, Dias had earlier netted his first Portugal goal to cancel out an opener from Chelsea’s Mateo Kovacic.
Joao Felix put Portugal ahead soon after but Kovacic was on target again to draw the hosts level.
But Dias struck late to snatch the win for Portugal.
Sweden’s 4-2 loss in France elsewhere in Group A3 means Croatia avoid relegation to the second tier.
Defeat by France on Saturday had ended Portugal’s hopes of reaching the finals and retaining the Nations League title they won in June 2019.
But they still fielded a strong team, as Cristiano Ronaldo, Diogo Jota and Bruno Fernandes all started.
It was a low-key affair until a poor clearance from Ruben Semedo on 29 minutes allowed Mario Pasalic to play in Kovacic, whose first shot was saved by Rui Patricio, but the resulting rebound was smashed into the net.
Dias’ equaliser seven minutes into the second half came less than a minute after Rog’s sending off for two yellow cards, the defender poking the ball home from a Ronaldo free-kick after keeper Dominik Livakovic spilled the ball.
Felix drove in the second after a handball by Jota in the build-up, but with no video assistant referee system in place to adjudicate, Croatia’s protests were dismissed and the goal stood.
Kovacic fired a low shot to equalise for Croatia, but a crucial error by keeper Livakovic as he failed to catch a corner in the last minute afforded Dias the chance to win the game.