Portugal's Cristiano Ronaldo tied the all-time men's record for international goals with a pair of penalties in a 2-2 draw with France in Group F in Budapest on Wednesday.
The result sees both teams advance to the round of 16 at the 2020 European Championship.
Portugal had the better of chances in the opening 30 minutes and went deservedly ahead through a Ronaldo penalty after France keeper Hugo Lloris fouled Danilo in the area as the two went for a free kick into the box.
In his storied career, Ronaldo had done it all for club and country, so this was surprisingly his first goal against France in his career.
Didier Deschamps' side drew level right before half-time when Nelsen Semedo brought down Kylian Mbappe in the area and Karim Benzema calmly slotted home from the spot -- his first goal for France since Oct. 8, 2015 -- to make it 1-1 at the break.
"It was a fight and it wasn't easy. We gave them the two goals from mistakes. We tried to win it," said Deschamps, whose side were in danger of a last-16 clash with England at Wembley when they fell behind. "It means we're top and that's the best position."
Benzema doubled France's lead shortly after the restart, running on to a lovely pass from Paul Pogba over the top of the defence and firing a low shot past Rui Patricio to beat the Portugal keeper at his far post.
However, Ronaldo wasn't done for Portugal, drawing his team back to level terms with another goal from the penalty spot following a whistle for handball on France's Jules Kounde in the area.
The goal put Ronaldo on 109 goals for his career, level with Ali Daei's record set during his long career with Iran's national team.
Patricio kept the scoreline level with a pair of impressive saves on a Pogba strike from distance and a close-range effort from Antoine Griezmann from the rebound.
France advance in first place from Group F and will face Switzerland in the round of 16 on Monday, while Portugal move on as one of the best third-place finishers to set up a knockout-round match against Belgium on Sunday.
"We were seeing the scoreline in the night's other match as Hungary were beating Germany, and it was making things very complicated," Deschamps said. "It was an insane match that went in all directions.
"I am really satisfied. Football is pure magic, from one situation to another the emotions can change so quickly. The morale of the team can change too. Tonight was pleasing even though not everything was perfect. It was a match on the top level."