(Adds details, quotes)
In a stellar career that spanned 11 years, since his debut against Ecuador in April 2003, Alonso was a crucial part of the all-conquering Spain team that shed their 'underachievers' tag to dominate international football for six years.
"I quit the Spanish National Team. The hardest thing is knowing when to say goodbye, and after thinking about it, I think that my time with the National squad has come to an end," the 32-year-old said in a statement on the Spanish football team's official website (www.sefutbol.com).
"It has been a glorious period with the Spanish team that started more than 11 years ago, I have formed part of an historical generation that has fulfilled the dreams of millions of fans.
"Since that April 30th, 2003 when I made my debut aged 21, I have only lived great moments, so I only have words of gratitude for all those with whom I have shared more than one decade," he added.
Alonso scored 16 goals for Spain but that statistic does not do justice to his contribution to their success.
From his deep-lying position he dictated the tempo of Spain's possession-orientated football and made up a formidable midfield trio alongside Barcelona maestros Andres Iniesta and Xavi, who announced his own international retirement earlier this month.
He started the showpiece finals of the 2010 World Cup and 2012 European Championship after making a substitute appearance as Spain beat Germany to win Euro 2008.
His international career ended on a sour note, however, as Spain suffered a shock group-stage exit at the 2014 World Cup in Brazil, winning just one of their three games.
While that proved a disappointing finale, it did not take the gloss of an international career where Alonso became one of the most important components in one of greatest football teams of all time.
Although some of Spain's golden generation received more plaudits and won more individual honours, few were as appreciated as much within the camp as the classy Alonso.
Spain head coach Vicente del Bosque told sefutbol.com: "It's very difficult to improve on what he has done. Together with his peers, he leaves behind a great legacy. He has been a great professional.
"The coaching staff and I hold him in great esteem and his behaviour has been impeccable for all this time." (Reporting By Tom Hayward; editing by Toby Davis)
- Sports & Recreation
- Xabi Alonso