The reigning World Cup champions returned to Buenos Aires on Thursday, receiving a thunderous reception from their loyal supporters, but they would have to wait until the final moments for their favourite son to get on the scoresheet with a landmark strike.
Messi had already hit the crossbar with a free kick in the first half, and after a second had been saved by inspired Panama goalkeeper Jose Guerra, he struck the woodwork again with a third, although this one led to the opening goal as Thiago Almada tapped in the rebound.
But Messi's fourth free kick finally curled under the bar and into the top-right corner, sending the stadium into raptures.
Of course, it was not so long ago that Messi hit another goals landmark.
His tap-in from Kylian Mbappe's inch-perfect cross against Marseille on February 26 was the 700th club goal of Messi's career - the strike against Panama was only his second for club or country since then.
Messi's stunner at El Monumental was his 99th on the international stage, with only his former nemesis Cristiano Ronaldo (120) and Iran legend Ali Daei (109) having scored more goals in international men's football.
But Messi looks set to continue playing for Argentina for a little while yet, with his 100th goal for the Albiceleste surely just around the corner.
Goalscoring data can get a little murky when you go deep into the past, with historical inconsistencies making it a little tricky to classify "official goals" or "official competitions."
The likes of Brazilian greats Romario and Pele are among a group of players deemed by some to have scored over 1000 goals over their careers, but many of those were netted in friendlies or "unofficial" games.
The International Federation of Football History and Statistics (IFFHS) considered Cristiano Ronaldo to be the first player to ever reach 800 official goals in December 2021.
With that in mind, Thursday's goal makes Messi the second to reach the landmark, and he is still going strong.
Of course, the vast majority of his 800 goals have been scored in the colours of Barcelona. During his 17 years with Barca's first team, Messi scored 672 times.
That is 440 more than any other player in the club's history, while he also holds their record for most appearances (778).
And with his future at PSG in doubt, he could yet extend those records back at Camp Nou, with Messi rated a "50 per cent" chance to return, according to his former Argentina teammate and close friend Sergio Aguero.
Aguero has called upon Barca president Joan Laporta to bring Messi back to Camp Nou, saying: "Laporta has to make an effort to bring Leo back.
"I think Leo should retire at Barca. Barcelona is his home, he has to finish his career here. My feeling is that there is a 50 per cent chance that he will return.
"I think if Laporta does that step to contact Messi, everything will be much closer to happening."