The 32-year-old made 125 appearances for Spain, putting him sixth on their list of all-time leading appearances.
He made his debut in 2006 and went on to win the 2010 World Cup, as well as the 2008 and 2012 European Championships.
In total, he scored 35 times, the fourth highest in Spain’s history.
Silva said: ”It is not easy, after all I’ve lived through, to sit and write these lines. It has been days and weeks of reflection and analysis to take the decision to end my era in the Spanish national team.
“Without a doubt it’s been one of the most difficult choices of my career, which I make with gratitude and humility.
“The national team has given me everything and allowed me to grow as a footballer and person since (playing in) the youth categories.
“I leave feeling happy with everything I have achieved. I lived and dreamed with a team which will be remembered forever; and I am bringing an end to an era filled with many moments which will live in my memory, such as the figure of Luis Aragones, a teacher I will never forget.”
His final match was the penalty shootout defeat to Russia in the 2018 World Cup round of 16.
Gracias, suerte y hasta siempre! 🇪🇸 pic.twitter.com/mIM1k45pfg
— David Silva (@21LVA) August 13, 2018
And the football world was united in their praise of Silva, a player widely considered one of the finest of his generation.
Dos jugadores impresionantes! Dos grandes personas! Muchas gracias por todo queridos @21LVA & @3gerardpique ! Que momentos vividos juntos en @SeFutbol ! Suerte en lo que os queda de carrera! pic.twitter.com/6g4u42MJFq
— Iker Casillas (@IkerCasillas) August 13, 2018
Señor David , desde mi más humilde opinión serás un gentleman.
— Ivan Campo (@ivan_campo) August 14, 2018
Gracias por defender nuestros colores.
Y aquí un ferviente admirador te seguirá don de semana tras fin de semana viéndote jugar tras muchos años en la @premierleague
🇪🇸@21LVA Spain career:
— Sky Sports Statto (@SkySportsStatto) August 13, 2018
125 caps
35 goals
2010 World Cup Winner
Euro 2008 & Euro 2012 Winner pic.twitter.com/xD0EuvA42X
👏 Congratulations @21LVA on being a part of an 🇪🇸@SeFutbol era that will go down in history! 🏆
— FIFA World Cup (@FIFAWorldCup) August 13, 2018
125 caps, 35 goals, you retire from the national team a Roja legend. pic.twitter.com/iqZrK0qhA9
Euro 2008—Champion
— B/R Football (@brfootball) August 13, 2018
World Cup 2010—Champion
Euro 2012—Champion
Over and out for @21LVA 🏆🏆🏆 pic.twitter.com/gEnotIoUAI
🙌🏼🇪🇸El mago de Arguineguín dice adiós al combinado nacional
— Selección Española de Fútbol (@SeFutbol) August 13, 2018
🔗https://t.co/lqILLG0yIH #GraciasSilva🎩 pic.twitter.com/ToVRvSSx3b
EL MAGO @21LVA met fin à sa carrière internationale. Un des meilleurs gauchers 👏🎩
— Alexandre Ruiz (@alexandreruiz) August 13, 2018
🇪🇸 2006-2018
125 capes / 35 buts
🏆 FIFA World Cup 2010
🏆 EURO 2008, 2012
🏆 EURO U19 2004 pic.twitter.com/CgUJaNvint
Ni en 200 años de vida podré agradecerte todas las alegrías que me has dado. Tu magia ya es eterna, así que puedes irte bien tranquilo. Gracias de corazón @21LVA pic.twitter.com/dmXfnDL1Yf
— MisterChip (Alexis) (@2010MisterChip) August 13, 2018
One of the best players ever to represent @spain has retired tonight from international football - David Silva of @ManCity has called it a day after playing 125 times for his country. Made his debut back in 2006.
— Jim White (@JimWhite) August 13, 2018
Fue un gran placer compartir tantos momentos en la @SeFutbol con vosotros! Gracias amigos @3gerardpique y @21LVA 🙌🏼🙌🏼 pic.twitter.com/lX2c9WXDcJ
— Marc Bartra (@MarcBartra) August 13, 2018
👏 A world class footballer is retiring from @SeFutbol, a 🔝 talent that we were lucky to see grow at @valenciacf 🦇👌
— Valencia CF English 🦇💯 (@valenciacf_en) August 13, 2018
Thank you for everything @21LVA! 🖤 https://t.co/U0SWkL79pc
⚽ Un referente del fútbol canario, con una trayectoria intachable. Gracias por tanto, @21LVA. https://t.co/DHHBRuRKuB
— CD Tenerife (@CDTOficial) August 13, 2018