"I leave with the peace of mind and pride of having given you — alongside my teammates — moments we once only dreamed of," he added.
Defeat in this year's World Cup final by Spain denied Messi a fairytale farewell, but his place among the game's greats had long since been secured.
After years of disappointment with Argentina, including defeat in the 2014 World Cup final and successive Copa America finals, Messi won his first major international trophy at the 2021 Copa America before leading his country to glory at the 2022 Qatar World Cup.