But despite lovely goals from Bernardo Silva, Nani and a penalty from Cristiano Ronaldo, AC Milan striker André Silva was the one to impress with a 79th minute wonder run from the half-way line leading to a gob-smacking goal.
Hirving Lozano's courageous second-half header sealed Mexico's comeback victory over 10-man Russian Federation in Kazan.
A 34th-minute Cristiano Ronaldo penalty opened the scoring for Portugal against the Kiwis, who had already been knocked out but were eager to go out on a high note, before Bernardo Silva doubled the European champions' advantage three minutes later.
On the suspension of Képler Laveran Lima Ferreira, also known as "Pepe" the coach said it may be a blessing in disguise because a new player might emerge in his place in the semi-finals.
Portugal eventually took the lead from the penalty spot on 33 minutes after Danilo was adjudged to have been pulled down in the box at a set-piece.
"We knew it could be complicated because we had seen New Zealand play Mexico and the problems they caused the Mexicans".
Portugal has progressed through to the semi-finals of the Confederations Cup with a 4-0 win over New Zealand.
A ruthless Portugal side put New Zealand to the sword with a 4-0 win on Sunday morning, sending the All Whites home from the Confederations Cup in bitter fashion.
Nani completed the scoring with his 25th global goal.
"I'm very proud to make 100 appearances, I hope to do even more", said Moutinho.
"We want to win this tournament, against whoever", the 29-year-old said.
It was his 75th goal for Portugal, bringing him level with Sandor Kocsis in second place on the list of Europe's highest worldwide goal scorers.
Portugal will face the Group B runner-up on Wednesday, June 28, with Mexico drawing the victor of Group B in a semifinal match scheduled for Thursday, June 29.
Chile and Germany are leading the group with four points each and there are slight doubts any upset can be created by either Cameroon or Australia, their opponents, who have a point each.