Sergio Ramos retired from international duty with Spain on Thursday, saying new coach Luis de la Fuente told him he did not count on him.
The Paris Saint-Germain defender, who won the 2010 World Cup and 2008 and 2012 European Championship with La Roja, last played for Spain in March 2021.
Ramos, who turns 37 in March, published an open letter on social media in which he indicated the new coach forced his hand.
"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."
Ramos played 180 times for Spain, making more appearances than any other player in the country's history.
Despite recovering from injury and building form with PSG Luis Enrique did not call him up for the Qatar 2022 World Cup.
De la Fuente replaced Luis Enrique in December after Spain crashed out of the World Cup against Morocco in the last 16.
Spain's next matches are qualifiers for Euro 2024 in March against Norway and Scotland.
"I humbly believe that this career deserved to end because of a personal decision or because my performance was not up to what our national team deserves, but not because of my age or other reasons that, without having heard them, I have felt," continued Ramos.
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."