The midfielder, who played a key role in his country's historic run of three successive major international title triumphs, says "the time has come" for him to walk away
The Real Madrid midfielder was a key component in the side that made history by winning three successive major tournaments: Euro 2008, World Cup 2010 and Euro 2012.
Alonso's Roja career appeared to end on a low, with the country having suffered a shock first-round exit at Brazil 2014 this summer, but the 32-year-old insists that he has nothing but found memories of his time with the national team.
"I want to report that I have finshed my time with Spain national," the Basque wrote in an open letter published on Sefutbol.com.
"The hardest part is knowing when to say goodbye and, after much thought, I think that time has come.
"I end with a glorious national team career that began over 11 years ago, having been part of a historical generation that has fulfilled the dream of millions of fans, doing something as unique as winning a World Cup and two European Championships in four years.
"Since April 30, 2003, when I made my debut at just 21, I have experienced only good times, so I have only words of thanks to all those with whom I have shared more than a decade.
"I want to thank all my coaches, team-mates and the millions of fans who have always shown me kindness and respect.
"Inaki Saez, the unforgettable Luis Aragones and Vicente del Bosque are figures that I will always carry with me for having helped me grow professionally and personally.
"I could not list all the colleagues with whom I have shared this shirt, but I want to thank each and every one of them for all you have shown me and taught me during this memorable period of my life.
"Thanks to Real Sociedad, Liverpool and Real Madrid for opening the doors to be part of a single dream. All my clubs have always helped and supported me to make it happen.
"Finally, I want to convey my sincere thanks to the fans. We dream together and share the glory together. We had many unforgettable moments.
"Good luck to all who continue to work and fight for this shirt, with the absolute conviction that they will achieve new successes.
"Thank you all and goodbye."
Alonso's retirement means that Spain have now lost two of the principal protoganists in their unprecedent period of dominance, with Barcelona playmaker Xavi having announced his retirement from international football shortly earlier this summer.
I announce my retirement from international football. It's been an enormous honour for 11 great years. Sincere thanks to everyone involved.— Xabi Alonso (@XabiAlonso) August 27, 2014