The match was played in front of a raucous crowd
Cristiano Ronaldo netted a double to become the European Championship's all-time leading scorer as Portugal struck three times late on to beat a stubborn Hungary 3-0 in their Euro 2020 opener at a packed Puskas Arena on Tuesday.
The holders, who appear to have a much stronger squad than when they won their first major title five years ago, laboured for long periods in Budapest.
But Raphael Guerreiro made the vital breakthrough in the 84th minute and Ronaldo slammed in a penalty shortly afterwards before tapping home in injury time.
"It was essential to start on the right foot in order to gain confidence," said Ronaldo. "Now, we have to continue and win the next game."
The Juventus striker has now scored 11 goals in the tournament, two more than French great Michel Platini, who netted nine times when he led France to glory in 1984.
The 36-year-old is also just three goals away from matching Iranian Ali Daei's all-time international scoring record of 109.
"It was a difficult game, against an opponent who defended very well during 90 minutes, but we scored three goals, and I am very grateful to the team for helping me to score two goals," he added.
Ronaldo chose by far the biggest crowd of the tournament to break the record in front of, with Budapest the only Euro 2020 venue not to limit fan capacity due to Covid-19.
The Puskas Arena has a capacity of almost 68,000 fans.
"We didn't deserve a 3-0 defeat, with a bit of luck it could have been a point each, but it was an experience of a lifetime," said Hungary goalkeeper Peter Gulacsi.
World Cup winners France and three-time European champions Germany meet in the other Group F game later in the day at Munich's Allianz Arena.
Portugal coach Fernando Santos opted to play Liverpool forward Diogo Jota and Bernardo Silva alongside Ronaldo, with Joao Felix left on the bench.
It almost paid instant dividends, as Jota forced Gulacsi into a smart save with a left-footed drive in the fourth minute, although he perhaps should have squared the ball for an unmarked Ronaldo.
The Portuguese talisman created an opportunity for Bernardo Silva in the 28th minute by winning the ball back high up the pitch, only for the Manchester City winger to delay his shot too long and see the opening snuffed out by an excellent tackle from Hungary centre-back Willi Orban.
Hungary offered very little from open play, although they sent Portugal a warning shortly before half-time when Adam Szalai headed a free-kick too close to Rui Patricio.
The best chance of the opening period fell to Ronaldo in the 44th minute, only for the Portugal captain to plant the ball over from six yards out after meeting Guerreiro's low cross.
Portugal came out of the blocks quickly after the break, knowing failure to win would put them in trouble in such a difficult group, with Pepe seeing a downward header well saved by the stretching Gulacsi.
Santos' men continued to press despite Hungary growing in confidence, with Bruno Fernandes drawing Gulacsi into another fine stop with a dipping strike from long range.
Despite having Felix, in-form Eintracht Frankfurt striker Andre Silva and Pedro Goncalves, last season's top scorer in the Portuguese league, on the bench, Santos waited until the 71st minute to make a change, sending on Rafa Silva for Bernardo Silva.
Hungary thought they had snatched a shock lead through substitute Szabolcs Schon, but he was denied by the offside flag.
Rafa Silva played a key role in the opening goal, though, as his deflected cross was met by Guerreiro, whose shot also took a huge deflection and dribbled agonisingly into the corner of the Hungarian net.
The home side's resistance was totally over three minutes later, as Orban pulled back Rafa Silva clean through on goal.
Ronaldo made no mistake, sending Gulacsi the wrong way to add another record to his collection on the day he became the first player in history to play at five European Championships.
There was more to come from Ronaldo, as he danced through after a one-two with Rafa Silva and rolled in his 106th goal for Portugal.