Cristiano Ronaldo scored his fourth goal of the 2018 World Cup 2018 but his team were deeply fortunate to secure three points against Group B opponents Morocco in Moscow.
The Real Madrid striker headed home a fourth-minute corner to give his side the lead at the Luzhniki Stadium, but the final score of 1-0 did not reflect the balance of play.
The result means Morocco are the first team to be eliminated from this year's tournament, reports The Telegraph.
Morocco dominated for the majority of the game, pushing their opponents back into their own half and a performance reminiscent of their dour, but ultimately victorious, Euro 2016 campaign.
Nordin Amrabat impressed in attack for Morocco, and a superb save from Rui Patricio after a Younes Belhanda header helped keep Portugal ahead.
Juventus's Medhi Benatia also spurned a good chance for Herve Renard's side to pull level but Portugal did enough to hold on for the win, albeit without winning any hearts and minds.