Cristiano Ronaldo became the first player to score in five World Cups, but Portugal required a couple of late goals to rescue a nervy 3-2 win against Ghana on Thursday.
Just two days after having his Manchester United contract terminated by mutual consent, free agent Ronaldo converted a penalty to break down a stubborn Ghana side in their Group H opener.
Ghana were furious with the awarding of the 65th-minute spot-kick for Mohammed Salisu's challenge on Ronaldo, but they hit back through Andre Ayew in the 73rd minute.
However, Joao Felix fired Portugal back in front and substitute Rafael Leao added a third, which proved important when Osman Bukari scored a late consolation for Ghana, who missed a glorious chance to snatch a point through Inaki Williams.
Ronaldo was denied by Lawrence Ati-Zigi after a heavy first touch and headed wide from the best of Portugal's limited first-half chances, before having a goal ruled out for a foul.
Alidu Seidu was lucky to only be shown a yellow early in the second half after locking heads with Joao Felix, but Ghana were less fortunate when a penalty was given to Portugal
Salisu was penalised for his challenge on Ronaldo, despite appearing to touch the ball before the player, and the superstar forward made no mistake from the spot.
That sparked some life into Ghana and Ayew steered home a leveller after Mohammed Kudus pulled the ball back into his path, but Portugal's own response was equally as swift.
Joao Felix raced onto Bruno Fernandes' throughball and dinked over Ati-Zigi, before Leao – on the field for just 45 seconds – curled in a delightful third for Fernando Santos' side.
Bukari, himself introduced from the bench, headed in from a Baba Rahman cross to set up a tense finish and Williams almost snuck an equaliser when he took the ball off the feet of an oblivious Costa before slipping at the crucial moment.