Cristiano Ronaldo took just four minutes to score the goal that made him the top-scoring European in international football as Portugal beat Morocco 1-0 in Moscow to dump Herve Renard's men out of the World Cup.
One the tournament's star performers so far picked up where he left off after his hat-trick against Spain in Portugal's opening 3-3 Group B draw, heading Fernando Santos' men into an early lead with a goal that moved him to 85 international goals - one ahead of the legendary Ferenc Puskas in the all-time standings.
Morocco head coach Renard came into the game having seen his players denied a point after dominating much of their opening encounter against Iran and they were largely the better side here too, keeping Portugal on the back foot and quelling the threat of Ronaldo for long periods.
Renard was involved in discussions with officials over two rejected first-half penalty claims but his side created enough chances to score from open play had they been more accurate in front of goal.
Portugal once again relied upon Ronaldo to produce their best moments and the weaknesses evident throughout the rest of Santos' team belie their pre-tournament billing as one of the favourites.
Morocco will have the chance to restore some pride by claiming a result from their final Group B game against Spain and will then head home disappointed not to have had more to show for two good displays in Russia, while Portugal took a huge step towards the last 16.
Khalid Boutaib headed wide as Morocco began the match on the front foot but they were undone by the irrepressible Ronaldo before they could find their stride.
Morocco defender Manuel da Costa failed to track the Real Madrid star as Joao Moutinho swung in a corner and Ronaldo stooped to power a header over goalkeeper Munir Mohamedi and into the middle of the goal.
Their World Cup campaign hanging by a thread, Renard's side rallied and Medhi Benatia brought a good low save from Rui Patricio with a downward far-post header and he was soon tested again by Hakim Ziyech's raking drive from 20 yards.
Portugal were pinned back for long periods as Morocco attacked in waves without causing any major scares, and they might have extended their lead when Ronaldo played Goncalo Guedes into the box but Munir stood tall and made a one-handed save.
Ronaldo blazed over the crossbar when Bernardo Silva's mishit presented him with a clear shooting chance on the edge of the box early in the second half.
Patricio then made a stunning save to preserve Portugal's lead when Ziyech's free-kick was headed towards goal by Younes Belhanda, the goalkeeper diving to palm the ball away from danger after it bounced up at him awkwardly.
Ziyech whistled another set-piece just over the crossbar from 25 yards as the minutes ticked away and both Nordin Amrabat and Benatia fired over with better chances, but there was to be no last hurrah for Morocco as their hopes of making the knockout stage slipped out of reach.