Cristiano Ronaldo has reached 125 international goals after scoring twice for Portugal in their 3-2 Euro 2024 victory over Slovakia.
The veteran Al Nassr attacker scored a first-half penalty and a second half tap-in as the Portuguese made it seven wins from seven matches in Group J.
They have 21 points which ensures them a top two finish and a spot in next year's finals in Germany.
Goncalo Ramos put Portugal into an 18th minute lead when he met Bruno Fernandes' cross in the eighth minute, heading the ball down and past Martin Dubravka in the Slovakia goal.
It marked a seventh goal in just nine matches for Ramos and a sixth assist of the campaign for Fernandes who almost doubled the score in the 26th minute only to be denied by a brilliant one-handed save by Dubravka.
Three minutes later Denis Vavro was adjudged to have handled the ball, a decision confirmed by VAR.
Ronaldo stepped up to slot home his 124th goal for Portugal in the venue where he scored his first international goal, against Greece in the opening game of Euro 2004.
Slovakia came back into the game in the 69th minute when David Hancko's shot from outside the area deflected off Antonio Silva's heel and into the bottom corner – the first goal Portugal had conceded in qualifying.
Three minutes later, Ronaldo restored the two-goal advantage tapping in another lovely cross from Fernandes for goal number 125.
Ten minutes from time, however, the game was back on as Stanislav Lobotka let fly from outside the area and buried the ball in the top corner.
Portugal should have sealed it late on but Diogo Jota was denied by the outstanding Dubravka but the hosts had done enough to stamp their ticket for the Euros.
“Cristiano Ronaldo is having a great time, playing a lot of minutes and scoring a lot of goals for his club,” said Portugal manager Roberto Martinez.
“He has a lot of experience with the national team and he's a reference point for young players.”
France have also secured their spot in Germany next year after Kylian Mbappe's double secured a 2-1 win over the Netherlands in Amsterdam.
Didier Deschamps' side have won all six of their Group B qualifying matches.
At the Johan Cruijff Arena, Les Bleus were comfortable for more than 80 minutes, even if a couple of mistakes by goalkeeper Mike Maignan could have cost them dearly.
Mbappe, who left the training camp for a day for personal reasons this week, volleyed home in the seventh minute from Jonathan Clauss's perfect cross before pointing to the sky with both hands.
France allowed the hosts to gain a bit of confidence before the interval but Mbappe made sure there would be no comeback eight minutes into the second half.
The 24-year-old, who has had an inconsistent start to the season with Paris St Germain, collected a subtle layoff from Adrien Rabiot before curling a sublime shot into the far top corner from the edge of the box for his 42nd international goal.
It took him past France great Michel Platini into fourth place on the national team's all-time top scorers list behind Olivier Giroud (54) Thierry Henry (51) and Antoine Griezmann (44). Griezmann was playing a record-extending 81st consecutive game for France.
The goals came as something of a relief for Mbappe, who had not scored in his last four competitive outings.
“I'm not one to worry, and especially not about Kylian. He showed today there was nothing to worry about,” said France manager Deschamps.
“When he's like this obviously France have more chances to win.”
The Netherlands were without Cody Gakpo, Jurrien Timber, Sven Botman, Matthijs de Ligt, Frenkie de Jong, Mark Flekken, Memphis Depay, Noa Lang, Teun Koopmeiners, Tyrell Malacia, and Steven Berghuis because of injuries.
Belgium are also through in Group F after a 3-2 win away to Austria, who would themselves have qualified with a victory, as Dodi Lukebakio scored twice before Romelu Lukaku wrapped up the points after the break.