Portugal's Ruben Dias scored his first two international goals to help the European champions to a 3-2 win at 10-man Croatia in their Nations League clash on Tuesday, stretching their unbeaten run against the hosts to seven games.
The Manchester City defender capped a fine individual performance with a 90th-minute winner after Croatia goalkeeper Dominik Livakovic spilled a corner, settling an entertaining contest in Poljud stadium.
The result left outgoing holders Portugal second in League A, Group 3 on 13 points from six games, three behind world champions France, who beat Sweden 4-2 at home having previously wrapped up their final-four berth in the competition.
Croatia finished third on three points, ahead of bottom team Sweden on goal difference, and avoided relegation from the Nations League top tier although the defeat is likely to pile more pressure on coach Zlatko Dalic.
Mateo Kovacic fired Croatia into a 32nd-minute lead but the home side suffered a double blow early in the second half as Dias levelled straight after Marko Rog was sent off for two yellow cards.
The second was brandished for a crunching foul on Cristiano Ronaldo, whose viciously swerving free kick was parried by Livakovic to Ruben Semedo who set up Dias to tap the ball in from close range in the 51st minute.
Although Ronaldo had a quiet evening, his team mates flourished on a poor pitch and Joao Felix turned the tide on the hour when he scrambled the ball home past two defenders on the line after good work by Diogo Jota.
Croatia appeared to be on the verge of earning a draw after Kovacic levelled with a superb first-time shot from the edge of the penalty area midway through the second half but they were undone by a late howler from Livakovic.
Although he was under no pressure, the keeper spilled a simple corner and the ball bounced off Dejan Lovren's back and Dias was perfectly positioned to sweep it into an empty net from eight metres.
Chelsea's Kovacic rued Croatia's defensive lapses.
"We conceded three silly goals and gave away a red card but at least we stayed up in the Nations League's top tier," he told reporters.
"I am happy to have grabbed two goals as I haven't scored too many for Croatia, but it's all about the team. We have to improve and get back to winning ways."
Dalic was relieved Croatia avoided the group's wooden spoon.
"We've managed to avoid the drop but not thanks to good performances," said the 54-year old coach who steered the Croatians to a runners-up finish in the 2018 World Cup.
"I am glad this year's international season is over, though a bit sad the lads were unable to avoid defeat against the European champions after a sterling effort."