A Cristiano Ronaldo header inside four minutes was enough to see Portugal to victory against a Morocco side who will feel the result was extremely harsh.
Despite Portugal gaining maximum points, Morocco went toe-to-toe with the European Champions all afternoon, but ultimately failed to find an equaliser.
This means that the African side crash out of the World Cup, becoming the first side to be officially eliminated from the tournament. The Moroccan fans will feel regret, as if luck was on their side they may still be in the running in Group B.
Ronaldo breaks more records
For the second time in as many games, Ronaldo fired his team ahead inside the opening five minutes. This time it was from a header, when he wriggled free of his marker to get on the end of a Joao Moutinho cross.
The goal was Ronaldo's 85th in international football, which is a European record. It also puts him top of the race for the golden boot on four goals.
With Morocco tipped pre-match to sit back and absorb pressure, the game plan went out of the window very early. The majority of neutrals would have expected it to be one way traffic from here, with Portugal naturally having space to exploit in the Moroccan defence.
This was not the case, as Hervé Renard's side put the Portuguese under immense pressure and had the better of the chances in the first half after Ronaldo's goal.
Morocco peppered the goal of Rui Patricio for the majority of the first half, with Boutaib and Ziyech coming close on a couple of occasions. Despite this, Portugal headed in at half time with their one goal lead intact.
Morocco punished by wastefulness
The best chance of the second half fell to Morocco, when Younès Belhanda forced a top save from Patricio. The Wolves-bound goalkeeper dived low with expert reflexes to deny Morocco.
In fact, the Portugal goalkeeper will be noted as a contender for man of the match, as his heroics denied Renard's side on more than one occasion.
As the game ticked on, the Portuguese looked nervous, gifting possession to Morocco on many occasions and looking shaky in defending crosses.
Late chances come and go
Pepe made an extremely important block for Portugal with minutes on the clock - this was coupled with a Benatia miss from a header that gave many the sense it wasn't going to be Morocco's afternoon.
From here, Portugal saw the game out without too much exertion, keeping the ball away from opposition in the Morocco half.
Ultimately, it was wastefulness in the second half that cost a Morocco side who will feel extremely hard done by to lose.
For Portugal, they momentarily top Group B until the Spain-Iran fixture later in the day.