Portugal beat Croatia 3-0 this morning (Hong Kong time) to win Group D and advance to the quarter-finals of the European Championship finals.
Joining them will be the losing side, Croatia. In the other Group D match, Denmark beat Turkey 3-0, but their faint hopes of going through were ruined by Portugal's victory.
Portugal's goal came from Luis Figo, Joao Pinto and a late strike from Domingos.
A vastly understrength Croatian side were outplayed by a lively Portuguese midfield which created scoring chances throughout the match.
Figo scored after four minutes to give a dream start for the Portuguese and Pinto added another on 33 minutes.
Then substitute Domingos took advantage of defensive disarray to score seven minutes from time.
Portugal scored only two goals in their two previous games but the chances came readily against a Croatian team showing seven changes from the side which beat Denmark last Sunday to clinch their own qualification.
Barcelona's Figo was on target with the first goal Croatia have conceded in the tournament.
He delicately guided home an easy chance manufactured by right-back Carlos Secretario.
Although Croatia came out fighting after that and raised the occasional half-chance at the other end, it was no real surprise when Portugal extended their lead.
Figo's corner found defender Fernando Couto who could not quite time his header, but the ball fell for Ricardo Sa Pinto, who acrobatically hooked it on for Joao Pinto to finish clinically from close range.
Croatia tried to fight Portugal's slick technique with some aggressive challenges and chalked up three yellow cards in the first half, while West Ham Slaven Bilic was lucky to escape punishment for a wild lunge at Couto when the German referee Bernd Heynemann's back was turned.
Croatia brought on Aliocha Asanovic, Zvonimir Boban and Davor Suker at the start of the second half in an attempt to restore at least a semblance of pride.
But it was Portugal's substitute Domingos who had two great chances to double his side's lead early in the second period.
Replacing Sa Pinto, who had taken a knock towards the end of the first half, Domingos was presented with two headed opportunities - the first by a 52nd-minute free kick from Rui Costa which he headed just over and then, four minutes later, Joao Pinto's intelligent forward ball sent the substitute racing clean through.
However, opportunist substitute Domingos was quick to spot his opportunity in a defensive mix-up to score Portugal's third. Dubravko Pavlicic's clearance bounced off Bilic and Domingos pounced on the ball to fire home left-footed.
At Sheffield Wednesday's Hillsborough's ground, three second-half goals against Turkey could not help Denmark squeeze into the quarter-finals.
The Dane's fate was in the hands of Portugal who needed only a point against Croatia.
But at least Denmark salvaged some pride when Brian Laudrup scored in the 50th and 84th minutes, and Allan Nielsen in the 70th minute, allowing them to end the defence of their 1992 European title with a victory.
They began in positive fashion and while scoring moments came quickly, the goals didn't.
The Danes should have opened the scoring just after the start of the second half when Laudrup sent a shot over the top after Rustu Recber had beaten away a close-range effort from Nielsen.
Laudrup's first came when Erik Bo Andersen headed the ball on for his Rangers colleague to skip away from 'keeper Recber and steer the ball into an empty Turkish net and chalk up his 13th goal for his country.
Nielsen fired over the top after a great through ball from Michael Laudrup, but was finally rewarded when he shot home in the 70th minute.
Laurdrup's second came when he found himself free on the right just inside the area.