On a night when it seemed that the young stars at the peak of their powers were making a statement of strength, and when a changing of the guard in world football appeared to be near, Lionel Messi sent a message from Kansas City.

To be the best, you have to beat the best.

And in this match, on this stage, in this sport, Messi remains the main man – even 20 years after he first appeared on the World Cup stage.

Just hours after Frenchman Kylian Mbappé had passed him on the World Cup’s all-time scoring list, and after Norwegian Erling Haaland had announced his arrival on the world stage with two goals against Iraq, the narrative seemed clear: the new generation (Mbappé is 27, Haaland 25) was ready to take the baton from Messi, who turns 39 next week, and from Cristiano Ronaldo, 41, who begins his World Cup on Wednesday.

But by the end of the night, Messi had not only passed Mbappé again on the all-time scoring list, but gone even further. He scored his first World Cup hat-trick and moved into joint first place with Miroslav Klose, with 16 goals in his career at the tournament.

Remarkably, Messi is now both the youngest and oldest scorer in Argentina’s World Cup history.

When he was substituted in the 79th minute, the crowd at Arrowhead Stadium rose to its feet to applaud him. Tens of thousands of fans had waited for hours in traffic just to see this man, this genius, under the brightest lights in world sport.

It took just six minutes for the wait to be rewarded – although the goal was ruled out.

Lautaro Martinez collected the ball at the edge of the box with his back to goal, controlled it beautifully and passed it to Messi on the left. As he had done hundreds of times before, his left foot seemed to have the ball tied to it with a string. He drove towards goal and sent the ball into the net.

But Messi was offside.

A little over ten minutes later, he scored a goal that counted – and it was spectacular.

After receiving a pass in the middle of the pitch, Messi headed towards the box, stepped to the left as five Algerian defenders closed in around him, and unleashed a powerful shot from around 20 metres. The ball glanced off the fingertips of goalkeeper Luca Zidane and ended up in the net.

It was classic football. It was vintage Messi. It was Messi magic.

The second goal, 15 minutes into the second half, showed his predator’s instinct in the box.

Alexis Mac Allister shot from around 30 metres, but the Algerian goalkeeper could not control the ball. Messi pounced on the rebound and calmly nudged it into the net to make it 2-0.

It was a pragmatic, simple goal, the goal of a legend who now plays as much with his mind as with his feet.

The third goal came as a result of the first two.

The Algerian defence looked resigned, tired and demoralised. Messi was left unmarked on the edge of the box. A pass from Nico Gonzalez came slightly behind him, but the Algerian defenders no longer had the strength to react.

Messi controlled the ball, half-turned and sent a low, precise shot into the corner of the goal. The goalkeeper could do nothing.

It was checkmate. It was the final nail. It was a clear statement.

Earlier in the day, Mbappé had dazzled with two goals for France, showcasing his full technical repertoire. Haaland, in his first World Cup match, scored twice for Norway in their 4-1 victory over Iraq.

On a day when all the stars shone at the World Cup, it seemed the moment of the changing of the guard had finally arrived.

Messi and Ronaldo have dominated this sport for so long that they have watched entire generations of footballers be declared their successors, only to then disappear from the scene.

Mbappé appears to be the natural heir: a world champion, leader of one of the biggest clubs in the world and a candidate to break numerous records.

Haaland, meanwhile, can claim to be the purest striker in the world, a goal machine who has already won almost everything at club level.

They are stars that shine brightly.

But when Messi left the pitch 11 minutes before the end amid cheers from the fans in Kansas City, he proved that Mbappé, Haaland and the others may be stars.

But he remains the Sun around which world football continues to revolve.