Cristiano Ronaldo became the top scorer in men's European Championship history as Portugal beat Hungary in front of more than 60,000 fans in Budapest.
Ronaldo converted an 87th-minute penalty for his 10th goal in the competition, overtaking France's Michel Platini on nine goals.
His 11th came only a few minutes later when he took the ball around goalkeeper Peter Gulacsi for Portugal's third.
Hungary had looked on course for an unlikely draw until they conceded three times late on.
The deadlock was broken in the 84th minute when Raphael Guerreiro's shot with the outside of the foot took a massive deflection off defender Willi Orban to break Hungary's brave resistance.
The other Group F teams are World Cup holders France and former champions Germany and they meet in Munich in Tuesday's late game (20:00 BST).
Cristiano Ronaldo has become the first player to play in five men's European ChampionshipsThe result looked comprehensive, but Portugal had to work hard to defeat their opponents in front of the biggest attendance of the tournament so far.
The 67,000-capacity Puskas Arena in Budapest is the only venue at Euro 2020 that will have full crowds and the fans helped create a fantastic, much-missed passionate atmosphere.
But the home supporters were nearly silenced in the fourth minute when Liverpool forward Diogo Jota had a chance, but saw his shot pushed away by Gulacsi when a pass to a wide-open Ronaldo may have been the better option.
Portugal, whose starting 11 included six Premier League players, created the best chances in the first half but Jota was again denied, with Ronaldo glancing a header wide and firing over when he should have hit the target.
Hungary were mostly restricted to long-range shots straight at goalkeeper Rui Patricio. However, home substitute Szabolcs Schon thought he had scored when he squeezed a shot in at the near post, but the goal was correctly ruled out for offside.
Portugal got their fortunate opener soon afterwards before Ronaldo's penalty after Willi Orban had fouled Rafa Silva.
Ronaldo then had the final say in injury time as he showed great skill to round Gulacasi for his second and Portugal's third.
What's next?
Hungary stay in Budapest and play France on Saturday (14:00), before Portugal face Germany in Munich (17:00 BST).
There was a full house at the 67,000-capacity at Puskas Arena in Budapest, HungaryThere were fans from both countries at the Puskas ArenaThe home fans created a colourful mosaic during the Hungarian national anthemPlayer of the match
SzalaiÁdám Szalai
Line-ups
Hungary
Formation 3-5-2
1Gulácsi
21Botka6Orban4Szalai
14Lovrencsics15Kleinheisler8Nagy13Schäfer5Fiola
20Sallai9Szalai
1Gulácsi21Botka6OrbanBooked at 86mins4Szalai14Lovrencsics15KleinheislerSubstituted forSigérat 78'minutes8NagySubstituted forVargaat 89'minutes13SchäferSubstituted forNegoat 66'minutesBooked at 80mins5FiolaSubstituted forVargaat 89'minutes20SallaiSubstituted forSchonat 78'minutes9SzalaiSubstitutes
2Lang3Kecskés7Nego10Cseri12Dibusz17Varga18Sigér19Varga22Bogdan23Nikolic24Schon26BollaPortugal
Formation 4-2-3-1
1Rui Patrício
2Nélson Semedo3Pepe4Rúben Dias5Guerreiro
13Danilo14William Carvalho
10Bernardo Silva11Bruno Fernandes21Jota
7Cristiano Ronaldo
1Rui Patrício2Nélson Semedo3Pepe4Rúben DiasBooked at 38mins5Guerreiro13Danilo14William CarvalhoSubstituted forRenato Sanchesat 81'minutes10Bernardo SilvaSubstituted forFerreira Silvaat 71'minutes11Bruno FernandesSubstituted forJoão Moutinhoat 89'minutes21JotaSubstituted forAndré Silvaat 81'minutes7Cristiano RonaldoSubstitutes
6José Fonte8João Moutinho9André Silva12Lopes15Ferreira Silva16Renato Sanches18Neves19Pereira Gonçalves22Dantas da Silva23Sequeira24Oliveira25Tavares MendesReferee:Cüneyt ÇakirAttendance:55,662Live Text
Match ends, Hungary 0, Portugal 3.
Second Half ends, Hungary 0, Portugal 3.
Foul by Danilo Pereira (Portugal).
Ádám Szalai (Hungary) wins a free kick in the attacking half.
Goal! Hungary 0, Portugal 3. Cristiano Ronaldo (Portugal) left footed shot from very close range to the centre of the goal. Assisted by Rafa.
Renato Sanches (Portugal) wins a free kick in the defensive half.
Foul by Gergo Lovrencsics (Hungary).
Substitution, Hungary. Kevin Varga replaces Attila Fiola.
Substitution, Portugal. João Moutinho replaces Bruno Fernandes.
Substitution, Hungary. Roland Varga replaces Ádám Nagy.
Goal! Hungary 0, Portugal 2. Cristiano Ronaldo (Portugal) converts the penalty with a right footed shot to the bottom right corner.
Willi Orban (Hungary) is shown the yellow card for a bad foul.
Penalty Portugal. Rafa draws a foul in the penalty area.
Penalty conceded by Willi Orban (Hungary) after a foul in the penalty area.
Goal! Hungary 0, Portugal 1. Raphael Guerreiro (Portugal) left footed shot from the centre of the box to the bottom left corner.
Danilo Pereira (Portugal) wins a free kick in the defensive half.
Foul by Ádám Szalai (Hungary).
Substitution, Portugal. André Silva replaces Diogo Jota.
Substitution, Portugal. Renato Sanches replaces William Carvalho.
Loic Nego (Hungary) is shown the yellow card.