Messi was bathing Lamine Yamal – the 16-year-old who is taking the European Championships by storm.
His goal against France in the semi-final on Tuesday is one that will be talked about for decades.
At 16 years and 362 days, the strike also made him the youngest man to score in the tournament’s history.
The long-forgotten photo of Messi and Yamal resurfaced after Yamal’s father posted it on Instagram last week with the text: “The beginning of two legends.”
The photos were taken by Joan Monfort, who works as a freelance photographer for the Associated Press.
The shoot came about after Unicef did a raffle in the town of Mataró where Lamine’s family lived, he said.
“They signed up for the raffle to have their picture taken at the Camp Nou with a Barça player. And they won the raffle,” Mr Monfort told the Associated Press.
The assignment wasn’t a straightforward one, the photographer said.
“Messi is a pretty introverted guy, he’s shy,” he said.
“He was coming out of the locker room and suddenly he finds himself in another locker room with a plastic tub full of water and a baby in it. It was complicated. He didn’t even know how to hold him at first.”
Like Messi, Yamal went on to play for Barcelona, where he became the club’s youngest ever starter and goalscorer, as well as the youngest scorer in the Spanish league.
Mr Monfort said it was only when the photo started going viral online last week that he realised that the baby was Yamal.
“It’s very exciting to be associated with something that has caused such a sensation,” he said.
“To tell you the truth it’s a very nice feeling.”