Antoine Griezmann rescued a point for France and denied Hungary one of the big European Championship shocks in front of a raucous 60,000 crowd in Budapest.
Attila Fiola fired Hungary into the lead just before the break as he held off the French defence to slot home after a one-two with Roland Sallai.
The goal was met by one of the loudest celebrations football has heard since March 2020 - or even before then - as the Puskas Arena went wild.
Fiola banged a pitchside reporter's table and knocked items off before he and his team-mates embraced some of the fans in the front row.
World champions France, tipped by many as the tournament favourites, had dominated the first half, with Kylian Mbappe in lively form again, before that goal.
Les Bleus were not impressive, although they did come back in the second half.
First, substitute Ousmane Dembele hit the post - and then his Barcelona team-mate Griezmann equalised.
Mbappe ran onto Hugo Lloris' huge kick down the field before laying it off - with the aid of a slight deflection - for Griezmann to slot home from eight yards.
The atmosphere was electric, but neither side could find a winner.
There was almost late drama when Presnel Kimpembe appeared to be fouled in the box by Sallai - but France were not given a penalty - and Raphael Varane headed wide with the last touch.
France, on four points, have probably done enough to reach the last 16 from Group F - although it is not guaranteed yet - and Hungary have kept their qualification hopes alive.
Germany, who lost to France in their opening match, face Portugal at 17:00 BST in Munich.
Magyars' magic moment
Whatever happens now, Hungary fans will always have the moment Fiola - a 31-year-old who has never played for a club outside his country - stunned the world champions.
He headed the ball into the path of Sallai, who flicked it back onto him. Fiola ran away from Benjamin Pavard and Varane to beat Lloris.
The celebration inside the Puskas Arena - the only venue at Euro 2020 to allow full crowds - was undoubtedly one of the moments of the tournament so far.
It was made even more impressive considering they lost their captain Adam Szalai to injury midway through the first half on a day where temperatures hit 30C, necessitating a drinks break in each half.
Hungary held out Portugal for 80 minutes in their opening game before conceding three goals. When Griezmann finally broke through you wondered if they would suffer a similar fate, but they held on.
They had few chances to win themselves, although Sallai's deflected shot needed to be saved by Lloris.
A win over Germany on Wednesday would probably take them into the last 16, but that game will be in Munich and not Budapest.
Decisions for Deschamps to make
France were a huge disappointment in this game - partially because so much is expected of them.
They beat Germany 1-0 in their opening game, through an own goal, in a match they controlled but rarely dazzled in.
Karim Benzema was added to the team who won the 2018 World Cup after a long international exile, but he did not appear to click fully with livewires Mbappe and Griezmann.
France had seven shots in the first half with Mbappe involved in the first six. He had four himself and created two chances for team-mates.
The Paris St-Germain striker headed a couple of efforts off target and flicked the ball into the path of Benzema to half-volley wide.
It appeared a matter of time until their goal came, but Hungary struck first.
They did not improve much after the break but Dembele went close when he hammered a shot off the post.
Griezmann was the top scorer at Euro 2016 and became the joint third top scorer in the tournament's history when he buried Mbappe's deflected pass.
You wondered if an onslaught might come after that - and Olivier Giroud replaced Benzema - but they only had two more efforts on target, from Mbappe and Corentin Tolisso.
Now they need something from Wednesday's final game against Portugal to ensure getting out of the group - and Deschamps has to work out how to get the best out of a talented group of players.
Match stats - Griezmann joins elite French club
France remain unbeaten in their past nine matches at major tournaments (W7 D2 - World Cup and Euros), although this draw ended their five-match winning run at major tournaments.This was the first time that Hungary avoided defeat by France in any competition since May 1976, when they beat them 1-0 in a friendly.Attila Fiola's opener for Hungary was the first time France had conceded in six matches in all competitions, ending a run of 527 minutes of play without shipping a goal.France are unbeaten in their past 11 group stage games at major tournaments (World Cup and Euros), winning seven and drawing four since a 2-0 loss to Sweden at Euro 2012.Antoine Griezmann has scored 11 goals at major international tournaments. Only Michel Platini (14), Just Fontaine (13) and Thierry Henry (12) have more for France.Despite not scoring, Kylian Mbappe attempted six shots for France against Hungary - his most in an international game.What's next?
Both sides play their final Group F games on Wednesday at 20:00 BST. Hungary go to Munich to face Germany and Portugal face France in Budapest.
Player of the match
FiolaAttila Fiola
Line-ups
Hungary
Formation 3-5-2
1Gulácsi
21Botka6Orban4Szalai
7Nego15Kleinheisler8Nagy13Schäfer5Fiola
20Sallai9Szalai
1Gulácsi21BotkaBooked at 52mins6Orban4Szalai7Nego15KleinheislerSubstituted forLovrencsicsat 84'minutes8Nagy13SchäferSubstituted forCseriat 76'minutes5Fiola20Sallai9SzalaiSubstituted forNikolicat 26'minutesSubstitutes
2Lang3Kecskés10Cseri11Holender12Dibusz14Lovrencsics17Varga18Sigér19Varga22Bogdan23Nikolic24SchönFrance
Formation 4-3-3
1Lloris
2Pavard4Varane3Kimpembe18Digne
6Pogba13Kanté14Rabiot
7Griezmann19Benzema10Mbappé
1Lloris2PavardBooked at 10mins4Varane3Kimpembe18Digne6PogbaSubstituted forTolissoat 76'minutes13Kanté14RabiotSubstituted forDembéléat 57'minutesSubstituted forLemarat 87'minutes7Griezmann19BenzemaSubstituted forGiroudat 76'minutes10MbappéSubstitutes
5Lenglet8Lemar9Giroud11Dembélé12Tolisso16Mandanda17Sissoko21Hernández23Maignan24Dubois25Koundé26ThuramReferee:Michael OliverAttendance:55,998Live Text
Match ends, Hungary 1, France 1.
Second Half ends, Hungary 1, France 1.
Attempt missed. Raphael Varane (France) header from the centre of the box misses to the right. Assisted by Thomas Lemar with a cross.
N'Golo Kanté (France) wins a free kick on the right wing.
Foul by Attila Fiola (Hungary).
Presnel Kimpembe (France) wins a free kick in the defensive half.
Foul by Roland Sallai (Hungary).
Foul by Kylian Mbappé (France).
Endre Botka (Hungary) wins a free kick in the defensive half.
Corentin Tolisso (France) wins a free kick in the defensive half.
Foul by Loic Nego (Hungary).
Foul by N'Golo Kanté (France).
Attila Szalai (Hungary) wins a free kick in the defensive half.
Substitution, France. Thomas Lemar replaces Ousmane Dembélé because of an injury.
Substitution, Hungary. Gergo Lovrencsics replaces László Kleinheisler.
Attempt saved. Corentin Tolisso (France) right footed shot from outside the box is saved in the bottom left corner. Assisted by Ousmane Dembélé.
Attempt saved. Kylian Mbappé (France) left footed shot from the centre of the box is saved in the top centre of the goal. Assisted by Olivier Giroud.
Corner, France. Conceded by Attila Fiola.
Foul by N'Golo Kanté (France).
László Kleinheisler (Hungary) wins a free kick in the defensive half.