In a crazy end to the game on Thursday night, Belgium thought they had won it a few minutes earlier, but Romelu Lukaku’s late effort was ruled out for offside by VAR.
Yannick Carrasco put Belgium ahead in the 37th minute and three minutes later Lukaku doubled the lead with a superbly scored goal.
Karim Benzema got France back into the game in the 62nd minute before Kylian Mbappe equalized from the penalty spot.
France were in the lead and were looking for the winner, but with three minutes left of regulation time, Lukaku appeared to have won the game for Belgium after connecting with a cross from Carrasco only to have the effort turned down.
French midfielder Paul Pogba then hit the top of the post with a superb curling free kick before the Blues took the win with Hernandez’s strike in the 90th minute.
Hernandez had started the match alongside his brother Lucas, making the couple the first two brothers to play for France since Hervé and Patrick Revelli played in a friendly against Romania in 1974.