BUENOS AIRES, Argentina (AP) — Argentine superstar Lionel Messi announced his retirement from international soccer on Monday, ending 21 years of service with the national team that culminated in winning the World Cup in 2022 to secure his place in the pantheon of the greatest players in sports history. “It was a decision that hurt, and still hurts deeply, but I understand that the time has come,” Messi, 39, said on his Instagram account. at club level with Inter Miami in Major League Soccer, and played in a record six World Cups. He won it four years ago in a tournament he dominated in Qatar and also led Argentina to the title game in 2014 and again this year, when the Albiceleste lost to Spain in extra time in New Jersey. Messi stands shoulder to shoulder with Diego Maradona, a compatriot to whom he is so often compared, and Brazilian icon Pelé as the greatest players of all time. AP AUDIO: Argentine star Lionel Messi retires from international soccer with one World Cup title and 125 goals. AP Washington correspondent Sagar Meghani reports that one of soccer’s legends is retiring from international play. For many, it is the best. “I swear to you that I always gave everything, not only in these last years when we won everything, but before too,” Messi wrote. “I always fought and left everything on the field for this shirt, to give you joy and feel proud of being Argentine through football.” Messi played 207 games for Argentina and finished as their all-time top scorer with 125 goals, 21 of them in World Cups. Only one player has more goals in men’s international matches: his lifelong rival, Cristiano Ronaldo, who has 146 and has not yet announced his retirement from Portugal. Messi became the World Cup’s all-time leading scorer for a month in the recent tournament in the United States, Mexico and Canada, but finished one goal behind Frenchman Kylian Mbappé. Messi decided two days after the World Cup final In a lengthy social media post, Messi explained that he wrote his retirement letter on July 21, two days after the World Cup final in which he struggled to make an impact, but waited to publish it because his father was facing health issues that eventually claimed his life. Jorge Messi died on August 8 in his native Rosario. Two months after Messi starred at the 2005 U-20 World Championship, scoring both goals for Argentina in the final victory, he made his debut for the senior team in Argentina at the age of 18. His first appearance lasted only two minutes; the substitute was sent off against Hungary in Budapest. His journey with the national team was fraught with more frustration: he briefly retired from Argentina in 2016 after three defeats in three consecutive major finals, until finally lifting the World Cup four years ago, while also winning Copa América titles in 2021 and 2024. “Thank you for all the love over these last 20 years,” he said. “I’m going to really miss hearing from all of you from the inside. Now I’m going to be one of you, cheering you on and supporting you from the outside (in good times and bad, even more so).” The recent World Cup showed that he is still one of the best players in the world, as did his four-goal display for Inter Miami over the weekend in a 7-1 win over CF Montreal. “I leave with the peace of mind and pride of having given you, along with my teammates, moments that we only dreamed of before. Experiencing this with you was incredible. I love you all,” he added. The second retirement Messi’s recent stellar success with Argentina almost didn’t happen. A decade ago he retired from the national team after Argentina’s loss in the 2016 Copa América final to Chile on penalty kicks, one of which he missed. A public campaign led by Maradona and the president changed his mind and Messi got rid of the idea of not being able to win important games, returned to the Argentine team and continued to be a star for Barcelona, then Paris Saint-Germain and then Inter Miami. two-time MLS MVP, the star of the league champion and someone who still creates goals in the biggest moments. He is also a record eight-time world player of the year. “It’s pure history,” said Argentine coach Lionel Scaloni during the recent World Cup. “History. A legend.” Always grateful The announcement of his retirement caused a wave of reactions. The president of Argentina, Javier Milei, wrote on Instagram: “Thank you very much, impossible man.” FIFA President Gianni Infantino praised Messi “for an extraordinary international career that has inspired millions of people and redefined our sport. Your magical talent and humility will be remembered forever.” The Argentine Football Association wrote: “Thank you for everything, Leo. Thank you for representing Argentina. Thank you for making us dream. Thank you for turning so many dreams into reality. The legend is yours forever.” Rodrigo De Paul, a teammate from Argentina and Inter Miami, highlighted on social media “your unconditional love for our country, your internal battles to never give up, your strength to always endure injustice and your leadership and character in dealing with each player.” Leandro Paredes, another teammate from Argentina, said: “Thank you for absolutely everything. You are and always will be the greatest of all time, Captain.” Defender Cristian Romero said: “I love you, I admire you and I will always be grateful for the impact you have had on me and our country. Thank you so much, Captain.”___AP sports writers Tim Reynolds and Steve Douglas contributed to this report.___See complete AP soccer coverage here