“The time has come, the time to say goodbye to the national team, our beloved and exciting Roja,” wrote Ramos.
“This morning I received a call from the current coach who told me that he does not and will not count on me, regardless of the level I can show or how I continue my career.
“With much sorrow, it is the end of a journey that I hoped would be longer and that would end with a better taste in my mouth, at the height of all the successes we have achieved with our Roja.”
The defender highlighted other veteran players still thriving, including PSG team-mate Lionel Messi, who won the World Cup last year with Argentina at 35.
“Because being young or less young is not a virtue or a defect, it is just a temporary characteristic that is not necessarily related to performance or ability,” added Ramos.
He referred to Messi and two former Real Madrid team-mates, Croatia’s Luka Modric, who is 37, and Portugal’s Pepe, 39, who all played at the World Cup.
“I look with admiration and envy at Modric, Messi, Pepe… the essence, tradition, values, meritocracy and justice in football.
“Unfortunately it will not be like that for me, because football is not always fair and football is never just football.”