Bruno Fernandes scored twice to give Portugal a 2-0 victory over Uruguay on Monday and send them into the knock-out stages of the World Cup alongside France and Brazil.
The Manchester United midfielder scored a cross-cum-shot nine minutes into the second half and then added an injury-time penalty following a handball by Jose Maria Gimenez.
The match at Doha's spectacular 89,000-capacity Lusail Stadium also featured the first pitch invader of the Qatar tournament – the man carried messages of support for Ukraine and Iranian women and had a rainbow flag.
"It was a well-deserved victory," Portugal coach Fernando Santos said.
"The first part is over, we are in a hurry. Now I will continue to work to improve what needs to improve.
"The team deserved it, they were solid and very strong both in the quality of the game and the bond between them."
With Portugal already through, Uruguay must now beat Ghana in their final Group H match to stand any chance of also progressing.
Both sides made three changes from their opening matches, with Portugal bringing in veteran Pepe for the injured Danilo Pereira, who suffered cracked ribs in training.
Pepe became the third-oldest outfield player in World Cup history and it was his first full 90 minutes in more than a month and a half.
"I worked a lot with my club (Porto), which gave me the possibility of being 100 percent for the national team," said Pepe of his surprise start.
Portugal dominated the first half, hogging the ball and creating several chances, but without ever testing Uruguay goalkeeper Sergio Rochet.
Uruguay's forwards, Edinson Cavani and Darwin Nunez, were starved of the ball but the South Americans still had the best opportunity of the first period.
Rodrigo Bentancur picked the ball up in his own half and surged forwards, slipping between two defenders to find himself one-on-one with goalkeeper Diogo Costa, who spread himself well to save the midfielder's shot.
Portugal captain Cristiano Ronaldo was largely anonymous in the first 45 minutes but did delight fans with a shoulder pass to pick out William Carvalho, who volleyed over.
The main drama came after the break.
Moments after a pitch invader ran onto the pitch carrying an LGBTQ rainbow flag and with a message supporting Ukraine and Iranian women on his T-shirt, only to be spectacularly tackled by security, Portugal went in front.
Fernandes created space for himself on the left and curled an inswinging cross into the mixer, with Ronaldo breaking the offside trap to attempt a glancing header.
As the ball nestled in the goal, Ronaldo wheeled away in celebration but FIFA decided he had not touched the ball, thus denying him a ninth World Cup goal, which would have put him level with Portuguese great Eusebio.
Uruguay coach Diego Alonso threw on forwards Maxi Gomez and Luis Suarez as the South Americans belatedly began to exert some pressure, and both came close to an equaliser.
Gomez's rasping drive from 20 yards came back off the post with Costa beaten, while Suarez hit the side netting from close range.
With the 90 minutes almost up, Fernandes nutmegged Gimenez, whose trailing hand diverted the ball away from the midfielder and prevented him from finding himself one-on-one with Rochet.
Iranian referee Alireza Faghani awarded the spot-kick after a VAR check and Fernandes sent Rochet the wrong way after his signature hop, skip run-up.
He then almost completed a hat-trick but hit the post from 20 yards.