In a stellar career that spanned 11 years, since his debut against Ecuador in April 2003, Alonso was a crucial part of the all-conqueringSpain 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 www.sefutbol.com
He added: "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 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."
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. The latter has also retired.
Alonso 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 last month's 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.
Coach Vicente del Bosque said: "It's difficult to improve on what he has done. Together with his peers, he leaves behind a great legacy. He has been a great professional." - Reuters