Spain captain Sergio Ramos suggested "instability" following the shock sacking of coach Julen Lopetegui was a factor in the team's poor World Cup performance.

Lopetegui was sensationally sacked on the eve of Russia 2018 after it was confirmed he was leaving to take over at Real Madrid following the tournament.

Fernando Hierro was hastily installed to take over but Spain disappointed for the second World Cup in a row as hosts Russia triumphed 4-3 on penalties in Sunday's last-16 tie in Moscow.

And the Spain captain - set to play under Lopetegui at Madrid - hinted he was unhappy with the decision to fire the coach, who was unbeaten during his two-year stay.

"I will not judge acts or decisions, but instability is never a good companion," Ramos wrote in a lengthy Instagram post the day after Spain's exit.

"Even so we maintained the cohesion, the strength of the group, the energy of a group of colleagues and friends, but the truth is that we have gone from more to less.

"And although many think we could have done more, we did not know how to do more. Because we leave ourselves on the pitch until the last drop of sweat, the last bit of energy and bravery.

Luis Rubiales, president of the Royal Spanish Football Federation, has backed his decision to sack Lopetegui despite Spain underperforming under Hierro.

And Ramos - who has signalled his intention to play on for his country towards the next World Cup in Qatar - said he remains proud of Spain's efforts despite the upheaval of the coaching change.

"We do not confront a whole trajectory by some stumbling blocks of our profession, our sport, our life," Ramos added.

"Unfortunately, most times you do not win, but the loser is the one who wins before they beat him, the one who lowers his arms in the storm, the one who turns his back on the difficulty.

"We could do better, we should have done better, but not only am I'm not ashamed, I'm proud to be the captain of this huge selection."

A turnover of players is likely in the Spain squad following their early exit, with Barcelona icon Andres Iniesta already confirming his retirement, while Ramos' defensive partner Gerard Pique previously announced he would step away from the national team after Russia 2018.

"A special reminder for a friend and friend in adventures and misadventures, that made us feel what we never imagined," Ramos continued. "Andres, it has been a pleasure to walk this road with you in red. Like I said yesterday, I wish you could have taken a better memory of your farewell.

"If you want to think about failure, you are free to do so. We prefer to think that it is a new opportunity to cry, to learn, to get up, to grow and to continue struggling. We will do it, that's for sure."