Argentina's football star Lionel Messi said on Monday he's retiring from playing for the national team after leading it to a second successive World Cup final in July and shortly after his father passed away.

"It was a decision that hurt and still hurts deep in my soul, but I understand that it is the right time," Messi, 39, wrote on Instagram, announcing his retirement from international football.

Messi, one of the game's greatest ever players, said that the decision had been painful but that he had considered it extensively since the final of the recent World Cup.

The 39-year-old captained Argentina to the final of last month's World Cup in New York, but he was unable to prevent his nation losing 1-0 to Spain and it proved to be the final match of his international career.

He led the team to World Cup glory in the 2022 final against France in Doha, and he played in a record-tying six World Cups.