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.